Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMenu items creating problems

 
Ashish Bhaskar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a application using the JMenuBar withe some MenuItems . The application frame also contains some other components like buttons , textfields etc. The problem is that the menuitem are hiding below the other components whenever the menubar is clicked. That is i am able to see the menuitems which are above the other components. Please reply soon
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a JMenuBar you need to be using JMenu's and JMenuItems. If you mix AWT components (which are heavyweight) and Swing components (which are lightweight = no os peer component) the AWT stuff will hide the swing stuff.
 
Ashish Bhaskar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cindy,
I am using JMenu with JMenuItems ....but the problem is not over..
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about the other components you mentioned? Are they JButtons and JTextFields or are you using AWT components?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic