• Post Reply Bookmark Topic Watch Topic
  • New Topic

JToolBar  RSS feed

 
Raja Islam
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
why we use JToolBar if we can do this by JButton.what the main difference between them.if JToolBar's setFloatable value is false.
 
Eureka Jana
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing comes to my mind is we can reduce the complexity by having one action listener for the entire toolbar.We can add anything to the toolbar like combobox, checkbox, image, etc.,Lets c what are all the benefits from others,
Thanks,Looking forward,
Jana
 
Zhao Fu Qiang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "setFloatable" method make the toolbar can be drag from it's container into a alone window.
The benefits that you use JToolBar is it can layout it's button, add separator,flat border like Internet Explorer,etc.
It can reduce your many code, and toolbar is used by too many application.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"zfq" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Thanks! and welcome to the JavaRanch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!