File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Menu problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Menu problem" Watch "Menu problem" New topic
Author

Menu problem

Peter Phung
Ranch Hand

Joined: Dec 06, 2001
Posts: 138
I've got a problem with a menu which i created. The menu when clicked appears behind a panel which is in the frame.
Does anyone know what i can do about this?


Pete<br />"Reality is an illusion <br />brought on by a lack of <br />drink, drugs and smut"
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Could the menu be lightweight and the panel be heavyweight?

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Peter Phung
Ranch Hand

Joined: Dec 06, 2001
Posts: 138
In all honesty i have no idea what u mean by heavyweight and lightweight, but i've posted the code relating to the panel and the menu.

I would appreciate any help you could give me
[ March 28, 2002: Message edited by: Nathan Pruett ]
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Yep... you are mixing lightweight(Swing) with heavyweight(AWT) components.... decide which one you're going with (AWT or Swing) and only use components from that one...

If you are going to go with Swing you will use JMenu, JMenuBar, JMenuItem, JPanel, and other Swing components only.

If you are going to go with AWT you will use Menu, MenuBar, MenuItem, Panel, and other AWT components only.

Lightweight components (Swing) are drawn onto their top-level components.

Each heavyweight component is technically a top-level component, so they get drawn on top of all lightweight components.

-Nate
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Menu problem
 
Similar Threads
z-index example
Breadcrumb in struts 2
Problem involving Recursion In Java...
How to put menu item in Title bar
Coordinates of a object in javascript...