Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JToolBar Buttons to Wrap to second line as needed

 
Payam Shahidi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Example JBuilder, when resize the frame so that all buttons of JToolBar can not be on a single line, ToolBar layout does force the buttons to go to the second line (hence toolbar height increases and the area under toolbar shrink a little bit) in most JToolBar sample codes JToolbar is places in BorderLayout.NORTH (Hence can not grow vertically) I made the toolbar layout FlowLayout.LEFT, Buttons do wrap however the height of the Toolbar does not increase, therefore 2nd row buttons do not show. Tried GridBagLayout instead of BorderLayout for the container Frame and still can not set the constraints in such a away to achieve my goal any iDEAS!!! payam_shahidi@yahoo.com .... Thanks
 
clio katz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried doLayout() prior to the repaints? (and gridbaglayout would be preferrable)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic