Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Separator in JToolBar  RSS feed

 
Manjula Rao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i add a line separator in JToolBar?
 
vinuv10
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you can try the addSeparator() method as ..
JToolBar statusBar = new JToolBar();
statusBar.addSeparator(new Dimension(10,10));
...
 
Manjula Rao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi vinuv10
i did try the method suggested by u but this just puts in a huge blank area between buttons. I wnated to seperate the buttons by somw sort of a vertical line separator.
i would appreciate help in this direction.
Thanx
Manjula
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you could make an image of a vertical line and add it to a JLabel and use the JLabel as a separator in your toolbar.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!