Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

12. (TCO 4) What event listener interface must be implemented by an object to en

ID: 642058 • Letter: 1

Question

12. (TCO 4) What event listener interface must be implemented by an object to enable it to handle events from a JButton? (Points : 6)        ActionEventListener
       ActionListener
       TextListener
       TextEventListener

Question 13. 13. (TCO 4) Which of the following are the correct steps for setting up event handling for a JCheckBox object? (Points : 6)        Create a class that represents the ItemListener event handler, and attach the JCheckBox to a JFrame object.
       Create a class that implements the ItemListener interface and register an object of that class with the JCheckBox variable.
       Implement an ActionEvent event handler and register it with the JCheckBox.
       None of the above.

Explanation / Answer

Question 13. 13. (TCO 4) Which of the following are the correct steps for setting up event handling for a JCheckBox object? (Points : 6)

       Create a class that represents the ItemListener event handler, and attach the JCheckBox to a JFrame object.
       Create a class that implements the ItemListener interface and register an object of that class with the JCheckBox variable.
       Implement an ActionEvent event handler and register it with the JCheckBox.
       None of the above.

Question 14. 14. (TCO 3) Which method determines if a JCheckBox is checked? (Points : 6)

       isSelected
       isChecked
       getButtonState
       None of the above.

Question 15. 15. (TCO 3) Which of the following creates a single line display which is user editable? (Points : 6)

       JLabel display = new JLabel(

Question 13. 13. (TCO 4) Which of the following are the correct steps for setting up event handling for a JCheckBox object? (Points : 6)

       Create a class that represents the ItemListener event handler, and attach the JCheckBox to a JFrame object.
       Create a class that implements the ItemListener interface and register an object of that class with the JCheckBox variable.
       Implement an ActionEvent event handler and register it with the JCheckBox.
       None of the above.