Things You'll Need:
- Computer
- Internet
-
Step 1
Locate your paint method. Set a parameter for a graphics class.
-
Step 2
In your code window, type: public void paint (Graphics g).
-
Step 3
In the graphics class you will set up your draw line method. To do this you must set the proper coordinates in sequence. This is easy. You name the angles you want to draw your line on, across and to. The following is an example code: g.drawLine (5, 32, 33, 50); Your code would draw a line from 5 to 32, then from 32 to 33, and arrive at 50.
-
Step 4
To import and draw images in to an object, you have to call the method. Type at the top of your code: import java.awt.Image.








