It's not a secret anymore!
The moose likes Java in General and the fly likes jmenuitem..unseen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "jmenuitem..unseen" Watch "jmenuitem..unseen" New topic


Maha Hassan
Ranch Hand

Joined: Aug 02, 2005
Posts: 133
i am using a jmenubar with jmenuitmes and jbars withina frame that contains a panel ,,BUTTTTT
the menuitems are HIDDEN behind the panel ,,,what shall i do
please help me
Tom McC

Joined: Jul 28, 2005
Posts: 21
Hi Maha,
I'm not sure a menu can be (at least easily) hidden behind other components. Are you sure that you're using the JFrame's setJMenuBar(JMenuBar) method to attach the menu to the frame? If so, have you added all the JMenuItems to the JMenuBar correctly?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Hi Maha,

You're using a "heavyweight" AWT component like a Canvas or Panel with a "lightweight" Swing JMenuBar. You can't mix Swing and AWT components unless you really know what you're doing. So pick one or the other, and your problem will go away.

I'm going to move this to our "Swing/AWT/etc" forum.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: jmenuitem..unseen
It's not a secret anymore!