n00bfest
http://n00bfest.com/phpBB3/

Java help
http://n00bfest.com/phpBB3/viewtopic.php?f=11&t=42865
Page 1 of 1

Author:  Hito [ Mon Nov 07, 2011 11:30 am ]
Post subject:  Java help

So I'm at the last end stretch with my java class and I'm wondering if anybody is good at writing stuff in java that can help me along the rest of the way. I'm basically not being taught by the teacher and the people in the lab are useless. If I hadnt taken a similar easier course before this one I would be having more problems than I am now... Anybody up for it?

Author:  dirkdeagler [ Mon Nov 07, 2011 12:10 pm ]
Post subject:  Re: Java help

Do you have specific questions that you can post here? Or do you need like a hand holding session where you work thru several things?

I have mostly javaSCRIPT experience which isnt totally separate from java, but it's different enough. I'm sure plenty of folks here know java though.

Author:  Hito [ Mon Nov 07, 2011 12:31 pm ]
Post subject:  Re: Java help

Well I was planning on posting some questions as they come... Might even post one tonight

Author:  dirkdeagler [ Mon Nov 07, 2011 12:46 pm ]
Post subject:  Re: Java help

Cool this could be fun & educational for a bunch of people. Post away, I'm sure you'll get help.

Author:  Gman [ Mon Nov 07, 2011 1:50 pm ]
Post subject:  Re: Java help

Shredder knows java extremely well. I'd reach out to Reborn and fomenta too.

Author:  madcoweater [ Tue Nov 08, 2011 12:08 am ]
Post subject:  Re: Java help

If I'm online and bored and see your post I can help you out.

Author:  Hito [ Tue Nov 08, 2011 9:44 pm ]
Post subject:  Re: Java help

K was wondering if anybody could explain how JFrame works in Java... here is an example from a lab assignment we had.

In today’s lab you will learn about:
Dynamic Data Structures in Java
Graphical Design Using the Java Swing Library
Problem Description
Write a program that will design and display a graph based on the specifications defined in an array of points. It should have the following appearance: (Pic not able to be shown... weird...)

You will need to define two classes: (1) a simple Point class that has instance variables (int) for the x and y coordinates of a two-dimensional point, and (2) a GraphDisplay class that extends JFrame and has the following code in it:

import java.awt.*;
import javax.swing.*;
One instance variable that is an array of Point items, defined as
private Point[] node = new Point[7]; // 7 points is enough to test the program
Create a window of size 400 x 400 pixels with the title "Graph Display" and a background color of LIGHT_GRAY. To do this, define a constructor for your GraphDisplay class that calls the constructor for JFrame via
super("Graph Display");
and then sets its size via
setSize(400, 400);
Enter the points of the graph as (x, y)
node 0 = (360, 40)
node 1 = (25, 25)
node 2 = (100, 150)
node 3 = (250, 100)
node 4 = (370, 370)
node 5 = (50, 350)
node 6 = (210, 210)
At each node[i], draw a GREEN circle of size (15, 15)
At each node[i], enter a text label of i. For example, at node[4], put the label "4".
Draw lines from node[0] to node[1], [1] to [2], [2] to [3], [3] to [4], [4] to [5], [5] to [6], and [5] to [3].

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/