JColorChooser: hide all default panels and show RGB and Swatches panels only

If you want to delete panels you can follow this approach Here I’m removing all the other panels except Swatches and RGB, AbstractColorChooserPanel[] panels=colorChooser.getChooserPanels(); for(AbstractColorChooserPanel p:panels){ String displayName=p.getDisplayName(); switch (displayName) { case “HSV”: colorChooser.removeChooserPanel(p); break; case “HSL”: colorChooser.removeChooserPanel(p); break; case “CMYK”: colorChooser.removeChooserPanel(p); break; }