anonymous / gist:4574797
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:4574797
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.