Which checkbox will be selected in the following code (Assume with main and added to AFrame)
Frame myFrame = new Frame("Test");
CheckboxGroup cbg = new CheckboxGroup();
Checkbox cb1 = new Checkbox("First", true,cbg);
Checkbox cb2 = new Checkbox("Scond", true,cbg);
Checkbox cb3 = new Checkbox("THird", false, cbg);
cbg.setSelectedCheckbox(cb3);
myFrame.add(cbl);
myFrame.add(cb2);
myFrame.add(cb3);
i
Answers
Answer:
Explanation:
A
Answer:
Option-c
Explanation:
Output- cb3
Explanation - as in a checkbox group only one can be selected.
Check box-
a small box (as in a checklist) in which to place a check mark (see CHECK entry 2 sense 7) to make a selection, indicate completion of a task, etc.
Use of checkbox-
A CheckBox is an on/off switch that can be toggled by the user. You should use check-boxes when presenting users with a group of selectable options that are not mutually exclusive.
Example of checkbox-
CheckboxGroup cbg = new CheckboxGroup();
Checkbox cb1 = new Checkbox("First", true,cbg);
Checkbox cb2 = new Checkbox("Scond", true,cbg);
Checkbox cb3 = new Checkbox("THird", false, cbg);
cbg.setSelectedCheckbox(cb3);
myFrame.add(cbl);
myFrame.add(cb2);
myFrame.add(cb3);
FINAL ANSWER-option-c
#SPJ3