Example usage for javax.swing JColorChooser setChooserPanels

List of usage examples for javax.swing JColorChooser setChooserPanels

Introduction

In this page you can find the example usage for javax.swing JColorChooser setChooserPanels.

Prototype

@BeanProperty(hidden = true, description = "An array of different chooser types.")
public void setChooserPanels(AbstractColorChooserPanel[] panels) 

Source Link

Document

Specifies the Color Panels used to choose a color value.

Usage

From source file:Main.java

public static void main(String[] argv) {
    JColorChooser chooser = new JColorChooser();
    int numPanels = chooser.getChooserPanels().length;
    AbstractColorChooserPanel[] newPanels = new AbstractColorChooserPanel[numPanels];
    newPanels[0] = findPanel(chooser, "javax.swing.colorchooser.DefaultHSBChooserPanel");
    newPanels[1] = findPanel(chooser, "javax.swing.colorchooser.DefaultRGBChooserPanel");
    newPanels[2] = findPanel(chooser, "javax.swing.colorchooser.DefaultSwatchChooserPanel");
    chooser.setChooserPanels(newPanels);
}