Reputation: 21
Guys I want to change the appearance of a disabled JRadioButton, JCheckBox
This code works well for ComboBox but when replaced by CheckBox or RadioButton no effect.
UIManager.put("ComboBox.disabledForeground", Color.BLACK);
Also i want the Button to be non-editable. So dont suggest options like
RadioButton.setEnabled(false);
Upvotes: 2
Views: 1869
Reputation: 324147
This code works well for ComboBox but when replaced by CheckBox or RadioButton no effect.
UIManager.put("ComboBox.disabledForeground", Color.BLACK);
For a JCheckBox
and JRadioButton
you should be able to use:
UIManager.put("CheckBox.disabledText", Color.BLACK);
UIManager.put("RadioButton.disabledText", Color.BLACK);
Check out UIManager Defaults for all the default values of the UIManager.
Upvotes: 2