Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 11. 11. (TCOs 16) Which of the following statements causes the program to terminate when closing the frame? (Points : 4) frame.setDefaultCloseOperation(null) frame.setDefaultCloseOperation(JFrame.STOP_ON_CLOSE) frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)

Question 11.11. (TCOs 16) Which of the following statements causes the program to terminate when closing the frame? (Points : 4)
frame.setDefaultCloseOperation(null) frame.setDefaultCloseOperation(JFrame.STOP_ON_CLOSE) frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) frame.setDefaultCloseOperation(JFrame.TERMINATE_ON_CLOSE)

Question 12.12. (TCOs 1, 5, and 6) Which type of exception occurs if the write method of BufferedWriter cannot write data to the file? (Points : 4)
WriteException IOException FileIOException FileException

Question 13.13. (TCOs 16) Suppose a JFrame uses the GridLayout(2, 0). If you add six buttons to the frame, how many columns are displayed? (Points : 4)
2 1 3 4

Question 14.14. (TCOs 16) The event handler (e.g., actionPerformed) is a method in (Points : 4)
both source and listener object. the EventObject class. a listener object. a source object.

Question 15.15. (TCOs 16) The _____ method of JOptionPane is used to retrieve input from a user using a dialog box. (Points : 4)
showInputDialog showInput getInputDialog getInput

Question 16.16. (TCOs 1, 4, and 6) A _____ component can contain one or more JMenu components. (Points : 4)
JMenuItem JMenuBar FileMenu BarMenu

Question 17.17. (TCOs 16) Suppose you wish to provide an accessor method for a double instance variable named percent, what should the signature method be? (Points : 4)
public static void getPercent() public double getPercent() public int getPercent() public void getPercent()

Question 18.18. (TCOs 1, 4, and 6) The method used to add panels to a JTabbedPane is (Points : 4)
newTab. newPanel. addPanel. addTab.

Question 19.19. (TCOs 16) A constructor cannot (Points : 4)
be overloaded. initialize variables to their defaults. specify return types or return values. have the same name as the class.

Question 20.20. (TCOs 16) A method that is associated with an individual object is called (Points : 4)
an object method. an instance method. a class method. a static method.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions