Question: In Java version 1.2, Java components in the new Swing package, such as JButton and JList, utilized the EDM ( known as the Event Delegation

 In Java version 1.2, Java components in the new Swing package,such as JButton and JList, utilized the EDM ( known as the

In Java version 1.2, Java components in the new Swing package, such as JButton and JList, utilized the EDM ( known as the Event Delegation Model) to respond to the user clicking a button or selecting an item from a list. Briefly explain the concept of the Event Delegation Model and how user-initiated events are handled by the GUI application. In other words, explain how a "listener" is connected with a GUI component and how its corresponding listener's abstract method works. (2 marks)1. A JRootPane, a JLayeredPane, and contentPane are hungry, so they walk into a bar, sit down at a table, and ask for a JMenuBar. The bartender asks "Is this some kind of joke"? The components assure him that they are hungry and want to order, so he hands the JMenuBar to the proper component. For one mark, which container component did he give the menu to? (1 mark)

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 Programming Questions!