This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMenuBar question  RSS feed

 
Efrat Bar-Nahum
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a menu bar with few menus.
The menus are located on the left side of the menu bar, and I want one menu to be at the right corner, far away from all the other menus.

How can I do it?
Thanks,
Efrat
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java docs

see MenuGlueDemo.java using BoxLayout and adding invisible components.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to use the "setHelpMenu()" method on JMenuBar - but this functionality hasn't been implemented (for a while) and just throws a runtime exception.

A good workaround if you want to do this is to insert a Glue component into the JMenuBar directly before the last JMenu.

 
Efrat Bar-Nahum
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!