Week13_Assignment

Week13_Assignment - Determine the currently selected color...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment for Chapter 14 Modify the program above to incorporate colors. In a separate window, provide a “toobar” of RadioButton objects that lists the following six colors: red, black, magenta, blue, green and yellow. The toolbar should be implemented as a subclass of Frame called ToolBarWindow and should consist of six buttons, each with the appropriate color name. When a new color is selected, drawing should occur in the new color. ToolBarWindow must have a method that returns a Color , titled getCurrentColor
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . Determine the currently selected color by calling the public method getCurrentColor on the ToolBarWindow . Extra Credit: Add a “ Clear ” button (see below) that clears the image. Pressing the clear button in the frame must cause the drawing to immediately clear itself. This will require interprocess communication between the Frame and your main applet (i.e., your Frame must be given the address of your main applet so that it can communicate to your main applet to clear itself)....
View Full Document

This note was uploaded on 10/12/2009 for the course CS 120 taught by Professor Robertdependahl during the Fall '09 term at Santa Barbara City.

Ask a homework question - tutors are online