Java

Java JColorChooser Example1 min read

In this example we are going to see how to use Java JColorChooser Example.

Java Code:




Output:

The JColorChooser class is used to create a color chooser dialog box so that user can select any color.

JColorChooser(): is used to create a color chooser pane with white color initially.

JColorChooser(Color initialColor): is used to create a color chooser pane with the specified color initially.

public static Color showDialog(Component c, String title, Color initialColor): is used to show the color-chooser dialog box.

Leave a Comment