Checkboxesare two-state components that are either "on" or "off," designated by a boolean true or false value that can be tested through the classesgetStatemethod. Checkboxes are usually manipulated through anactionmethod override.Checkboxes may be used separately or they may be grouped into a
CheckBoxGroupfor which only one of the checkboxes may be true at any one time.See the
Checkboxclass in the java.awt package.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 );