This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Menu problem

 
Peter Phung
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could the menu be lightweight and the panel be heavyweight?

-Nate
 
Peter Phung
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic