public
anonymous / gist:4574797
Created

  • Download Gist
gistfile1.txt
1 2 3
 
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.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.