'Javax Swing change menu background color while app is running

I have a Javax Swing application that I want to change the background color of the menu while the application is running. I can easily change the color on startup using the nimbus theme and setting the nimbusBase property. This also works to change other colors in the app while it's running but not the menu:

UIManager.put("nimbusBase", LIGHT_NIMBUS_BASE_COLOR);

I am able to change other colors while the application is running using a similar line but for some reason the menu will not update it's color. After all colors are updated I call:

frame.repaint();


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source