Changing color of text on a disabled JButton
843806Feb 16 2009 — edited Feb 16 2009Hello,
I have a board represented by rows and columns of buttons. Once the button is clicked, I want to disable it (using setEnabled(false)). Then I want to put display text on it and I call setText() but I also want to change the text color,
so I call setForeground(). Unfortunately, setForeground() doesn't seem to work once the button has been disabled. I do not really want to use Icons for just some text. Is there any way to overcome this problem please? setBackground still works while the button is disabled.
Thank you very much.