Is there a way to change the color of the Jradiobuttons font using UImanager

I know how to change the font of JRadioButton using UIManager, and I know how to change the color of JRadioButton, one button at a time. However, is there a way to use the UIManager to change all JradioButtons in my application so that the font, say white, instead of black is the default.

+5
source share
1 answer

You can change UIDefaultsat the beginning of your program:

UIDefaults uiDefaults = UIManager.getDefaults();
uiDefaults.put("RadioButton.foreground", new ColorUIResource(Color.white));

Just use a contrasting color for the background.

+6
source

All Articles