I want to use the swatches panel pinned to a toolbar in my original JFrame without having to open a new frame with multiple panels
I tried to remove another taps but still the swatches tap opens on a new frame
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.DefaultRGBChooserPanel")) {
chooser.removeChooserPanel(oldPanels[i]);
} else if (clsName.equals("javax.swing.colorchooser.DefaultHSBChooserPanel")) {
chooser.removeChooserPanel(oldPanels[i]);
}
}