[header] How to use graphics in a java applet [title] Use the drawline method of the graphics class. [step] The arguments to the method should be, in order, the first x coordinate, the first y coordinate, the second x coordinate, and the second y coordinate. The line will be drawn from the first x and y to the second. 
Here is an example : [substeps] The line will be drawn from (10 , 20) to (50 , 60). [title] Invoke the drawrect method of the graphics class.