aspose file tools
The moose likes Java in General and the fly likes help in JMenuBar Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "help in JMenuBar" Watch "help in JMenuBar" New topic
Author

help in JMenuBar

Maged Roshdy
Greenhorn

Joined: Feb 08, 2003
Posts: 24
hi
after adding JmenuBar to the frame
and adding a panel in the center i find that when i open any menu it comes down under the panel and i can't see it
thanks
Maged
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Panels are part of the AWT and are heavyweight components, meaning that they are closely tied to the underlying OS peer that actually communicates with the hardware.
JMenuBars are Swing and are lightweight, so they are not as closely tied to the peer.
Mixing the two can cause problems - as you have noticed, the heavyweight ones will stomp on the lightweight ones.
Try using a JPanel instead.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: help in JMenuBar
 
Similar Threads
gridbag length and status bar question
jmenuitem..unseen
JMenu
jmenuitem..unseen
How to create horizontal menus