Java Chapter 14 Questions and Answers| 100%
Verified
When you use the getSource() method with an ActionEvent object, the result is __________.
✔️✔️an object
A class can implement __________. ✔️✔️as many listeners as it needs
When you write a method that reacts to JCheckBox changes, you name the method
__________. ✔️✔️itemStateChanged()
If a class contains two components that might each generate a specific event type, you can
determine which component caused the event by using the __________ method.
✔️✔️getSource()
To group several components, such as JCheckBoxes, so that a user can select only one at a time,
you create a __________. ✔️✔️ButtonGroup
Suppose that you have declared a ButtonGroup named threeOptions and added three
JCheckBoxes named box1, box2, and box3 to it. If you code threeOptions.setSelected(box1);,
then threeOptions.setSelected(box2);, and then threeOptions.setSelected(box3);. Which box is
selected? ✔️✔️box 3
What cannot be specified in any version of the JTextField constructor? ✔️✔️requiring that the
value entered be non numeric
You do not need to create UI components from scratch ✔️✔️True
The Window class is a child of ✔️✔️Container
Verified
When you use the getSource() method with an ActionEvent object, the result is __________.
✔️✔️an object
A class can implement __________. ✔️✔️as many listeners as it needs
When you write a method that reacts to JCheckBox changes, you name the method
__________. ✔️✔️itemStateChanged()
If a class contains two components that might each generate a specific event type, you can
determine which component caused the event by using the __________ method.
✔️✔️getSource()
To group several components, such as JCheckBoxes, so that a user can select only one at a time,
you create a __________. ✔️✔️ButtonGroup
Suppose that you have declared a ButtonGroup named threeOptions and added three
JCheckBoxes named box1, box2, and box3 to it. If you code threeOptions.setSelected(box1);,
then threeOptions.setSelected(box2);, and then threeOptions.setSelected(box3);. Which box is
selected? ✔️✔️box 3
What cannot be specified in any version of the JTextField constructor? ✔️✔️requiring that the
value entered be non numeric
You do not need to create UI components from scratch ✔️✔️True
The Window class is a child of ✔️✔️Container