This is an optional challenge lab to help you exercise your Java skills over spring break. It's quite a bit more advanced than the regular labs that we do and covers a lot of concepts in swing and basic data structures that you will need for the next installation of the JFig assignment.
The basic idea is to produce a very, very, very simplistic CAD program that will allow the user to trace a single polyline, reset the drawing space, and change both the background and the foreground colors, as shown below. Note that while the below example is provided as a Java applet, your implementation should use a JFrame instead. Otherwise, try to make your implementation as similar to mine as you can.
I will be glad to answer questions, provide guidance, or review your attempts at this challenge over spring break.
Here are some hints to help you along the way:
paintComponent(Graphics) method in order to draw on
the panel.paintComponent(Graphics) method; there is no way to draw
the polyline directly on the panel from where you trapped for the click
event. This means that you will need to share state information between
your event-trapping code and the paintComponent method and
force this method to run by calling repaint().