Radio Buttons

Some important methods of Checkbox (beyond the previously discussed checkbox methods):
Method Action
getCheckboxGroup() Returns the the group for the checkbox
setCheckboxGroup() Changes the group a checkbox is associated with


Some important methods of CheckboxGroup:
Method Action
getCurrent() Gets the currently selected checkbox in the group
setCurrent(Checkbox) Sets the currently selected checkbox in the group



Create an applet that adds a checkbox to it.
  1. you must create a Java applet with a class that extends the Applet class. (you must import the java.applet package).
  2. you should create an init() method that among other things creates a CheckboxGroup and adds checkboxes to it.


Here is the applet
Need Java Enabled Browser

Solution