| Posted: | May 5 |
|---|---|
| Due: | May 14 [Solution] |
| Mailto: | Schreiner |
Implement an applet that understands (some of) the old UNIX plot functions:
| space(left, bottom, right, top) | defines user coordinates for the drawing area's borders. |
| point(x, y) | shows a new current point. |
| move(x, y) | defines an invisible new current point. |
| cont(x, y) | draws a line to the indicated new current point. |
| label(text) | places the text at the current point. |
| line(x0, y0, x1, y1) | draws a line between the indicated points. |
| circle(x, y, radius) | draws a circle around the indicated point. |
| erase() | erases the drawing area. |
Hints: A Canvas should serve as the drawing area. The ``functions'' above should create objects that are saved by the canvas and it's paint() would then ask each of the objects to draw itself. space() could influence, what kind of Graphics object the canvas passes to it's inhabitants.
erase() might be harder. It is no big loss if you ignore it initially.
Hint: You can use Web.java as a private web server to test your applet under networking conditions. Don't submit the proxy server from this directory as your solution.