When responding to the mouse moves, simply use the size and color variables to determine the proper size and color to draw with.

Extend the Painter program (fig. 14.38) to include options for changing the size
and color of the lines drawn in a panel contained in a form. Create a GUI similar to
the one in the text at the end of chapter 14 (fig. 14.43). Use variables to keep track
of the currently selected size (int) and color (Color object). Change the values of
those variables in the event handlers for the radio buttons. Use one event handler for
each group of radio buttons. When responding to the mouse moves, simply use the
size and color variables to determine the proper size and color to draw with.
Add an option to clear the drawing for extra credit. (+ 2 points)
Also provide menus for the options for extra credit. (+ 3 points)
Add a customizable palette or brush size for extra credit. (+ 3 points)
INPUT: User should be able to
• Select color
• Select size of line drawn
• Give mouse input
OUTPUT: Output is all done on a form. The form should display
• Groups of radio buttons
• a picture of the drawing
TURN IN all materials in a 9×12 envel

Leave a Reply

Your email address will not be published. Required fields are marked *