• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMenu Menu hiding behind JPanel

 
Ron Patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you need to make it a heavyweight object.

Put something like this in your panel code:

setLightWeightPopupEnabled( false );
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic