CheckBox and RadioButton

0

CheckBox:-

It is used to choose multiple options in a group of options.
getState():-  it will return true if the checkbox will be checked and return false if the checkbox will be unchecked.
if(checkboxname.getState())
{
}
getLabel():-  it is used to display content of CheckBox means if we write CheckBox Label Java then getLabel() will return Java.
RadioButton:-
AWT does not provide any classes for RadioButton We can convert CheckBox to RadioButton using
CheckboxGroup Class.
CheckboxGroup grp = new CheckboxGroup();
Checkbox ch = new Checkbox(label,grp,true);


Tags

Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)