Homework 4: ColorEditor

Here are solutions to Homework 4. The ValueSlider class demonstrates how to build an atomic AWT component out of several existing components. The ValueSlider is an "extra". It not required by the homework. You can trivially modify ColorEditor.java to use a regular Scrollbar instead of a ValueSlider if you wish. All you have to do is change the type of the redSlider, greenSlider, and blueSlider to be a Scrollbar instead of a ValueSlider. You also need to make the code call the Scrollbar constructor instead of the ValueSlider constructor. The arguments to use are the same except that you should swap COLOR_MAX with the COLOR_MIN.

See comments in code for detailed explanations.

[back]