View Single Post
Old Feb 2nd, 2008, 6:01 PM   #1
truBlu
Newbie
 
Join Date: Sep 2007
Location: New Jersey
Posts: 13
Rep Power: 0 truBlu is on a distinguished road
Send a message via MSN to truBlu
2D Graphics in Java

Here's my situation. I've been thrown into an assignment involving 2D graphics. My assignment is to draw a line. I've been reading the java docs and staring at example code and I just don't get any of it. I know that I have to use Point2D to select different points and then Line2D to draw a line segment and Graphics2D to draw it to the screen but I just don't understand how I'm to use any of the classes. I need a Graphics2D object but I can't instantialize an object because it's an abstract class. Can anyone offer me some advice or point me to a nice tutorial explaining everything?

I'm coding in Java 6.
truBlu is offline   Reply With Quote