How can I hide all default panels at JColorChooser
except HSB?
And is it possible to show just HSB without JTabbedPane, just plain panel
Thank you!
import javax.swing.*;
import javax.swing.colorchooser.*;
class ColorChooserTest {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JColorChooser cc = new JColorChooser();
AbstractColorChooserPanel[] panels = cc.getChooserPanels();
for (AbstractColorChooserPanel accp : panels) {
if (accp.getDisplayName().equals("HSB")) {
JOptionPane.showMessageDialog(null, accp);
}
}
}
});
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With