Multiple Choice
Complete this code fragment to ensure that the application exits properly when the user closes the frame:
JFrame frame = new JFrame() ;
A) frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) ;
B) JFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) ;
C) JFrame.setCloseOperation(JFrame.EXIT) ;
D) frame.setCloseOperation(JFrame.EXIT) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q3: Use the _ method to specify the
Q11: When drawing complex shapes, provide a(n) _
Q31: A(n) _ has an instance method addActionListener()
Q39: To build a user interface that contains
Q41: Consider the following code snippet:<br>JPanel panel =
Q43: Which of the following statements about events
Q44: Consider the following code snippet:<br>Public static void
Q44: Which of the following is an event
Q45: Consider the following code snippet:<br>JPanel panel =
Q45: Place drawing instructions inside the _ method,