1

I am using Swing with the Look And Feel Nimbus. I've changed the default colors, with code like this:

    UIManager.put("nimbusBase", BLUE);
    UIManager.put("inactiveCaption", GRAY);
    ...

The problem, is that a disabled JSpinner doesn't use gray for it's background (like all the other components), but blue instead:

jspinner nimbus

If I change the "nimbusBase", then my scrollbars etc aren't blue any more. How do I set a disabled JSpinner's background to gray?

Note: Adding this doesn't change anything:

    UIManager.put("Spinner.disabled", GRAY);
Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • Nimbus tends to use Painters (and other methods) for applying effects, take a look at [this example](http://stackoverflow.com/questions/22927451/set-text-fields-disabled-background-color/22927529#22927529) which changes the editable state of a text field, but should provide some ideas – MadProgrammer Oct 21 '15 at 20:39

0 Answers0