List of usage examples for javax.swing JColorChooser removeChooserPanel
public AbstractColorChooserPanel removeChooserPanel(AbstractColorChooserPanel panel)
From source file:Main.java
public static void main(String[] argv) { JColorChooser chooser = new JColorChooser(); AbstractColorChooserPanel[] oldPanels = chooser.getChooserPanels(); for (int i = 0; i < oldPanels.length; i++) { String clsName = oldPanels[i].getClass().getName(); if (clsName.equals("javax.swing.colorchooser.DefaultSwatchChooserPanel")) { chooser.removeChooserPanel(oldPanels[i]); } else if (clsName.equals("javax.swing.colorchooser.DefaultRGBChooserPanel")) { chooser.removeChooserPanel(oldPanels[i]); } else if (clsName.equals("javax.swing.colorchooser.DefaultHSBChooserPanel")) { chooser.removeChooserPanel(oldPanels[i]); }/*from w w w. j ava 2s.c om*/ } }