JCheckbox : Java Glossary


Note the upper case B, in JCheckBox. JCheckBox is the Swing equivalent of the AWT (Advanced Windowing Toolkit) Checkbox. Checkbox uses getState and setState, where JCheckBox uses isSelected and setSelected.

Here is what is looks like:

screen shot of a JCheckBox

Each box is one JCheckBox.

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

Here is how to use a

When you convert from an AWT CheckBox, you must change the getState calls to isSelected calls.

Learning More

Oracle’s Javadoc on JCheckBox 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:

Canadian Mind Products
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