Say that the Graphics object grph
has a drawing area of width=200 and
height=150.
Fill in the blanks so that a line is drawn from the lower left corner to the
upper right corner of the area.
grph.drawLine( 0, 149, 199, 0 )
Since the height is 150, and the numbering of pixels starts at zero, the Y coordinate of the lower left corner is 149.
You may wish to browse through the following. Click on a subject that interests you to go to where it was discussed.
JApplet
.