How many radio buttons can be selected at the same time as the result of the following code?
Hours = new JRadioButton("Hours") ;
Minutes = new JRadioButton("Minutes") ;
Seconds = new JRadioButton("Seconds") ;
Days = new JRadioButton("Days") ;
Months = new JRadioButton("Months") ;
Years = new JRadioButton("Years") ;
TimeOfDayButtonGroup = new ButtonGroup() ;
DateButtonGroup = new ButtonGroup() ;
TimeOfDayButtonGroup.add(hours) ;
TimeOfDayButtonGroup.add(minutes) ;
TimeOfDayButtonGroup.add(seconds) ;
DateButtonGroup.add(days) ;
DateButtonGroup.add(months) ;
DateButtonGroup.add(years) ;
A) 1
B) 2
C) 3
D) 4
Correct Answer:
Verified
Q27: Assume that radio references a JRadioButton object.
Q28: What will be the result of executing
Q29: Which of the following statements is NOT
Q30: This layout manager arranges components in five
Q31: This is a basic window that has
Q33: The variable panel references a JPanel object.
Q34: Event listeners must:
A) implement an interface
B) be
Q35: If button1 is a JButton object, which
Q36: When a component is added to a
Q37: You use the _ key word in
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents