Change JCheckBox/JRadioButton selection color

前端 未结 1 1560
隐瞒了意图╮
隐瞒了意图╮ 2021-01-06 12:42

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

\"alt

相关标签:
1条回答
  • 2021-01-06 13:34

    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.

    0 讨论(0)
提交回复
热议问题