This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JMenu Menu hiding behind JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenu Menu hiding behind JPanel" Watch "JMenu Menu hiding behind JPanel" New topic

JMenu Menu hiding behind JPanel

Ron Patel

Joined: Apr 11, 2004
Posts: 18
Hey everyone,

I have a very strange problem that I never saw before. I have a JFrame with a JMenu. As the content pane, I have a JPanel that contains a GUI generated by code written using JNI.

When I click on the JMenu, the drop down menu hides behind the JPanel so nobody can see the menu.

However, if I use just a blank JPanel, I can see the drop down menu.

How can you fix this?
jefff willis
Ranch Hand

Joined: Sep 29, 2004
Posts: 113
Sounds like you need to make it a heavyweight object.

Put something like this in your panel code:

setLightWeightPopupEnabled( false );
I agree. Here's the link:
subject: JMenu Menu hiding behind JPanel
Similar Threads
Drop down menu
OK...another one that is way out there...
IMPOTANT: Drop down Menu disappears partially behind system tray in windows
Html drop down menu and applet issues
Creating one class from another