Swing and Nimbus: Replace background of JPopupMenu (attached to JMenu)
问题 Nimbus often looks great, but for certain color combinations the result is non-optimal. In my case, the background of a JPopupMenu does not fit, which is why I want to set it manually. I'm on Java 7 and, interestingly, Nimbus fully ignores the setting of some properties in the UIManager (like PopupMenu.background ). So my only option was to create a subclass of JPopupMenu that overrides paintComponent(...) . I know, that's nasty, but at least it worked. However, if you add a JMenu to another