3

Is there a way to change the selection color of a checkbox/radiobutton?

alt text

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Vasyl
  • 1,393
  • 15
  • 26

1 Answers1

6

Here is how to do it for a JCheckBox

UIManager.put("CheckBox.focus",Color.RED);

There is a nice tool here: http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/ that if you run the Java Web Start program it will allow you to browse the keys and values for each component.

jzd
  • 23,473
  • 9
  • 54
  • 76
  • 1
    Works, thank you. Also for jRadioButton: UIManager.put("RadioButton.focus", Color.RED); – Vasyl Jan 06 '11 at 09:04