Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change JCheckBox/JRadioButton selection color

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

alt text

like image 420
Vasyl Avatar asked Dec 08 '25 09:12

Vasyl


1 Answers

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.

like image 78
jzd Avatar answered Dec 09 '25 22:12

jzd