Creating a JColorChooser
In Swing, the JColorChooser class creates a dialog box allowing the user to not only select a color of their choice, but also to manipulate the color. It is an impressive option.
JColorChooser offers a pane of controls for picking a color from a palette of colors. It can be placed anywhere in a GUI program. |
Create and Activate a JColorChooser: |
|
|
Example: The user is asked to choose the background color for the window. A color panel will appear for the user to use to make a color choice.