Line Java Example

Use your mouse to drag either end of the line. The line of java code that draws the
line is displayed at the bottom of the applet. Use this simple applet to explore the
coordinates of the java drawing space. Note that (0,0) is in the upper, right-hand corner.
Use the link below the applet to examine the simple source code for this applet.

After you've got a sense of what is going on, try dragging the line outside the bounds of the
applet. If it really gets messed up, just Refresh this page to reload the applet.

View Source Code