• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMenuBar Layout  RSS feed

 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The default Layout manage of a JMenuBar is BoxLayout.

Suppose two menus "File" and "Edit" are added to a JMenuBar, so every menu's width should be 50% width of the whole frame or screen.
But from L&F the width of menu "File" or "Edit" is much small, why?

Thanks!
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
every menu's width should be 50% width of the whole frame
You can change the menuBars layout to GridLayout(1,0) to do this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!