Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Menu  RSS feed

 
Chris Tan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a frame with a menubar at the top and a Panel at the bottom. I notice when I drop down my menu, the menu is blocked by my Panel. How can I make my menu show in front of the panel instead? Thank in advance
 
Paul Santa Maria
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using a "Panel" (as in AWT), or a "JPanel" (as in Swing)?

If the former, then try substituting a "JPanel" and see if that helps.

Here's a link with some more info:
http://java.sun.com/products/jfc/tsc/articles/mixing/
 
Petrus Pelser
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you add the menu bar to the frame (using add()) or did you use setJMenuBar()?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!