|
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.
|