devxlogo

Using JToggleButtons Inside the JToolBar

Using JToggleButtons Inside the JToolBar

JToggleButtons work well when you want buttons that stay down or up inside the JToolBar. You can also make them behave like Radio buttons (only one button down at a time) by adding them to a ButtonGroup. However, if you want to raise a depressed button when an operation is finished, you will need to write your own Mediator class instead of using the Mediator provided by the ButtonGroup.

devx-admin

Share the Post: