Java Color Test
Here's an applet which takes advantage of the following java elements:
- AWT Scrollbars
- Scrollbar listeners
- GridLayout AWT layout manager
- Runs as either an Applet or an Application
- Handles exceptions if invalid values are entered into the text boxes
Try to do the following:
- Update a scrollbar value. The text box will change to
reflect the new value. Also, if you update the RGB values, the HSB
values will be recalculated and updated to match. And vice-versa.
- If you enter an invalid value in a text box, the invalid
value will throw an exception which will be caught, and your invalid value
will be rejected.
- Download the jar file and unpack the class files.
Then run "java ColorTest". This will run the ColorTest
program as an application.
View the source here (note the file name has a .txt extension so you can view
it in your browser): ColorTest.java,
You can also download the entire project jar'd up here.
The Drinking Games
| The Development Site