Question: Question 61 pts What happens when a JButton is 'clicked' by the user? An ActionEvent object is created containing details of the event. The JButton

Question 61 pts

What happens when a JButton is 'clicked' by the user?

An ActionEvent object is created containing details of the event.
The JButton object sends an 'actionPerformed' message to all registered listeners, passing along the ActionEvent object in the process.
Objects registered as listeners may query the ActionEvent in order to gain information about the event.
All of the above.
None of the above.

Flag this Question

Question 71 pts

What is the purpose of a layout manager object in Java Swing?

Determines the position and size of each component in a container when that container is painted on the screen.
Determines the hierarchy when one component is placed inside another.
Determines the order in which windows are painted by the operating system.
Allows the programmer to specify how a component should be rendered.
None of the above.

Flag this Question

Question 81 pts

What must be done in a class file so that instances of that class may be registered with a JButton as listeners?

The class must directly or indirectly implement javax.swing.JButton.
The class must have an instance variable of type javax.swing.JButton.
The class must directly or indirectly extend javax.swing.JButton.
The class must directly or indirectly implement java.awt.event.ActionListener.
The class must directly or indirectly extend java.awt.event.ActionEvent.

Flag this Question

Question 91 pts

Which of the following Swing components serves as a "top-level" container?

JPanel
JFrame
JButton
JTable
JTop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!