• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Menu problem

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I brought this back from the farm where they grow the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic