JColorChooser Example Java Swing

JColorChooser Example Java Swing

Swing JColorChooser gets your own color palette. The color you selected either with RGB or HSB style can be applied to any Swing component. In the program,it is applied to Container (indirectly to JFrame).
Example on JColorChooser


JColorChooser
Output screen on JColorChooser Example

clr = JColorChooser.showDialog(this, “Choose Your Color”, Color.green);

The fist parameter this refers the parent class JColorChooserDemo, the second refers to the title of the color chooser dialog box and the third one is the default color selected in color chooser.

Leave a Reply

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