Create a gist now
Instantly share code, notes, and snippets.
HTTPS clone URL
Subversion checkout URL
|Add a static nested class ColorPanel which creates a panel (and listeners) for two Color choice boxes, one for the line color and one for the fill color. Provide at least 8 colors. Use the same techniques you learned in previous lessons. These Choice boxes should work; if a user chooses a line color of Blue, the model should be updated so that the next figure drawn will have a Blue line color, etc. The choice boxes should be properly labeled. A good place for this inner class is in the ControlsPanel or MainPanel. The idea is to put the class close to where it is used to make maintenance easier.|
|Modify the ButtonPanel's Clear button so that it no longer uses an anonymous inner class, but rather, a local inner class. Its functionality should not change.|