• 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

help in JMenuBar

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic