Mark Roth            Week 7 - AWT Events and Painting Lab            January 26, 1999

This lab is designed to give you some practice dealing with AWT events and painting.

Write a Java application that displays a Frame that allows users to construct polygons, as seen below:

The drawing area is a 300 x 300 canvas (you should override java.awt.Canvas with your own class and provide a paint() method). A user will click the left mouse button numerous times to place points in the window. For each click of the left mouse button, your program is to draw a series of black line segments that connects each of the points together. With a final click of the right mouse button, the polygon should close and fill itself with blue.

There are to be two buttons on the bottom of the window called "Clear" and "Exit." When "Clear" is clicked, the image is cleared. When "Exit" is clicked the application exits. Users should also be able to exit the application by closing the window.