(TCOs 1, 4, and 6) Consider a form with a ButtonGroup with three radio buttons a
ID: 3864315 • Letter: #
Question
(TCOs 1, 4, and 6) Consider a form with a ButtonGroup with three radio buttons and two check boxes. What is the total number of radio buttons and check boxes that can be selected at any time? (Points : 3)
5
4
3
2
Question 3.3. (TCOs 1, 4, and 6) The _____ method of a check box returns true if that button is checked. (Points : 3)
isSelected()
getSelected()
Selected()
isChecked()
Question 4.4. (TCOs 1, 4, and 6) The getSelectedText method of the JTextArea component (Points : 3)
returns all the text in the JTextArea.
sets the selected text in the JTextArea.
returns the selected text in the JTextArea.
sets the text in the JTextArea.
Question 5.5. (TCOs 1, 4, and 6) Every event object has the _____ method that returns the object that triggered the event. (Points : 3)
getSource()
getTrigger()
getEventObject()
getObject()
Question 6.6. (TCOs 1, 4, and 6) Which statement is used to place the component lblMessage on a JPanel panel1? (Points : 3)
panel1.addComponent(lblMessage);
panel1.lblMessage.add();
lblMessage.add(panel1);
panel1.add(lblMessage);
Question 7.7. (TCOs 1, 4, and 6) A JMenu component can contain one or more _____ components. (Points : 3)
JMenuItem
JMenuBar
FileMenu
BarMenu
Question 8.8. (TCOs 1, 4, and 6) JRadioButton supports multiple listeners for event handling. Which listener is NOT supported by JRadioButton? (Points : 3)
ActionListener
ItemListener
ChangeListener
WindowListener
Question 9.9. (TCOs 1, 4, and 6) If a keyboard shortcut is created for a menu item, the shortcut or mnemonic character to be used is indicated in the menu’s name using (Points : 3)
underline.
bold.
italic.
a different font.
Question 10.10. (TCOs 1, 4, and 6) Which method returns true if the radio button radOne has been selected by the user? (Points : 3)
radOne.Selected()
radOne.Selected(true)
radOne.isSelected(true)
radOne.isSelected()
Explanation / Answer
Question 1: 3(one radio button and 2 check boxes)
Question 3.3 : isChecked()
Question 4.4: returns the selected text in the JTextArea.
Question 5.5: getSource() Returns the object on which the Event initially occurred.
Question 6.6 : panel1.add(lblMessage);
Question 7.7: JMenuItem
Question 8.8: WindowListener
Question 9.9: underline.
Question 10.10: radOne.isSelected()
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.