Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener lsnr)
adds an action listener to the CheckbBox.
|
void |
setSelected(boolean enabled)
sets the CheckBox to selected/pressed state, or not.
|
void |
setText(java.lang.String text)
sets the text of the checkbox.
|
setEnabled, setVisible
void setText(java.lang.String text)
Sets the text that will be displayed on the checkbox.
text
- the text for the CheckBoxvoid setSelected(boolean enabled)
enabled
- true if the checkbox is pressed, false if notvoid addActionListener(ActionListener lsnr)
The action listener is invoked if the checkbox is clicked and the mouse/finger is released inside the checkbox .
lsnr
- the action listener to add