Checkboxes
are two-state components that are either "on" or "off," designated by a boolean true or false value that can be tested through the classesgetState
method. Checkboxes are usually manipulated through anaction
method override.Checkboxes may be used separately or they may be grouped into a
CheckBoxGroup
for which only one of the checkboxes may be true at any one time. Example:Panel sexPanel = new Panel ( ); Label sexLabel = new Label ( "Sex:"); CheckboxGroup sexGroup = new CheckboxGroup ( ); Checkbox female = new Checkbox ( "female", sexGroup, false ); Checkbox male = new Checkbox ( "male", sexGroup, false );