JToggleButton : Java Glossary


the Swing equivalent of the AWT (Advanced Windowing Toolkit) Checkbox. Checkbox uses getState and setState, where JToggleButton uses isSelected and setSelected. In Swing, you can use either JCheckBox, JRadioButton or JToggleButton.

Here is what it looks like:

JToggleButton screenshot

Each button in one JToggleButton.

JCheckBox uses a checkmark; JRadioButton uses a dot in a circle and JToggleButton uses ordinary-looking buttons.

Here is how to use JToggleButton:

Learning More

Oracle’s Javadoc on JTogggleButton class : available:
Oracle’s Javadoc on ButtonGroup class : available:

This page is posted
on the web at:


Optional Replicator mirror
of mindprod.com
on local hard disk J:

Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number