The variable panel references a JPanel object. The variable bGroup references a ButtonGroup object, which contains several button components. If you want to add the buttons to the panel:
A) use the statement, panel.add(bGroup) ;
B) use the statement, bGroup.add(panel) ;
C) use the statement, Panel panel = new Panel(bGroup) ;
D) add each button to panel one at a time, e.g. panel.add(button1) ;
Correct Answer:
Verified
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
Q32: How many radio buttons can be selected
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
Q38: Which of the following statements creates a
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