Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started