I'm pretty sure I did my research before coming to you for help, but maybe I missed something.
I am writing java UI using Nimbus laf. I want to change the background color of JSpinner when the state changes, i.e. When the button is pressed up or down, the background color of the text field in jspinner changes color to indicate that the value has been changed.
I know that this is possible using OTHER lookandfeels, but not so simple with a halo, for example:
((JSpinner.NumberEditor)jSpinner1.getEditor()).getTextField().setBackground(color.yellow);
I also looked at the actual change in the color theme of the user interface manager, but I want to change the color only when the action occurs, and not just the default.
here or here
Is it possible, and where to start?
Otherwise, I was hoping to just change the color of the button:
jButton.setBackground(Color.yellow);
It's simple enough, but since the default color is a colored gradient, how do I change it?
In fact, someone knows or can help.
We really appreciate in advance!
Daryl source
share