I’ve got a Swing form made up of a JFrame containing a JMenuBar and a JSplitPane (further subdivided into resizeable JPanels). The problem is that when I select one of the drop down menus, if one of the dividers for the JPanels is under the menu, it actually gets rendered on TOP of the menu! As if the divider had focus instead of the menu.
I had this same problem with another (similar project that I did), never found a fix, just gave up using a menubar (went to a tab/keystroke based system). I really want to make menus work on this current project, hopefully without having dividers poking through the menus and annoying me. 🙂
Ideas?
OK, I got it, and it’s an interesting case indeed!
I eventually figured out that some of the code in part of the form is injecting some custom components. Delving into those custom components reveals that they’re painting into the graphics space (via fill3DRect)… Items painted that way always end up displayed/”on top”…
Now, to try to figure out how to make them function in a Swing world… 🙂