Check Boxes
Some important methods:
Method
Action
getLable()
Returns a string containing this checkbox's label (How you can TELL WHICH CHECKBOX is checked).
setLabel(String)
Changes the text of the check box's label
getState()
Returns true or false whether checked or no
setState(boolean)
Changes state of box to true-checked or false-unchecked
NOTICE THAT MORE THAN ONE CAN BE CHECKED...IF WANT ONLY ONE CHECKED USE RADIO BUTTONS.
Create an applet that adds a checkbox to it.
you must create a Java applet with a class that extends the Applet class. (you must import the java.applet package).
you should create an
init()
method that among other things creates a checkbox and adds them to the applet's panel.
Here is the applet
Need Java Enabled Browser
Solution