Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes JToolBar Buttons to Wrap to second line as needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JToolBar Buttons to Wrap to second line as needed" Watch "JToolBar Buttons to Wrap to second line as needed" New topic
Author

JToolBar Buttons to Wrap to second line as needed

Payam Shahidi
Greenhorn

Joined: Dec 10, 2002
Posts: 3
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

Joined: Apr 30, 2004
Posts: 101
have you tried doLayout() prior to the repaints? (and gridbaglayout would be preferrable)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JToolBar Buttons to Wrap to second line as needed
 
Similar Threads
floating JToolBar doesn't close
Scrolling within a JTabbedPane
GridLayout with weightx
How to set a Vertical line in JToolBar
How to create a custom JButton-Menu JToolbar item...?