I have a JButton that I would like to change the background color of to white. When using the Metal Look And Feel, I achieve the desired effect with setB
instead of messing with the button's background color, could you do whatever indication you're trying to show a different way?
displaying an Icon, making the button bold instead of plain text, etc.
Indicating something only through a different background color isn't always obvious, and depending on the user's system colors, may be jarring, or invisible.
for example, what if the user is running windows in "high contrast" mode?