Override Swing Nimbus L&F primary color per component instance

Viewed 6817

i’m trying to override the “nimbusBase” color for specific instance of JButton/JTabbedPane with no luck. only the specific attributes of the component e.g. “Button.background”, are working. any idea?

UIDefaults dialogTheme = new UIDefaults();
// dialogTheme.put(“nimbusBase”, Color.orange);
// dialogTheme.put("nimbusBlueGrey", Color.blue);
dialogTheme.put("Button.background", Color.yellow);
JButton dialogButton = new JButton("North");
dialogButton.putClientProperty("Nimbus.Overrides.InheritDefaults", true);
dialogButton.putClientProperty("Nimbus.Overrides", dialogTheme);
1 Answers
Related