Demos and Usage of java.awt.CheckboxGroup.getSelectedCheckbox()


   1:   Checkbox male=null,female=null;                
   2:   CheckboxGroup group=null;
   3:   Button  ����������=null,�˳�������=null;
   4:         ...
   5:     nameFile=new TextField(10);
   6:     group=new CheckboxGroup();
   7:     male=new Checkbox("��",true,group);
   8:         ...
   9:            this.setName(nameFile.getText()); 
  10:            String sex=group.getSelectedCheckbox().getLabel();
  11:            if(socket!=null&&name!=null)

View Full Code Here
   1: public class QuestionPanel extends Panel implements ActionListener {
   2:     private    CheckboxGroup    check_box_group;
   3:     private    Checkbox        check_box[];
   4:         ...
   5:         
   6:         check_box_group = new CheckboxGroup();
   7:         for (int i = 0; i < num_choices; i++) {
   8:         ...
   9:         if (source == next_button || source == done_button) {
  10:             Checkbox response = check_box_group.getSelectedCheckbox();

View Full Code Here
   1: public class QuestionPanel extends Panel implements ActionListener {
   2:     private    CheckboxGroup    check_box_group;
   3:     private    Checkbox        check_box[];
   4:         ...
   5:         
   6:       check_box_group = new CheckboxGroup();
   7:       String[] answers= currentQuestion.getAnswers();
   8:         ...
   9:         if (source == next_button || source == done_button) {
  10:             Checkbox response = check_box_group.getSelectedCheckbox();

View Full Code Here