answersLogoWhite

0

Event model is based on the concept of an 'Event Source' and 'Event Listeners'. Any object that is interested in receiving messages (or events ) is called an Event Listener. Any object that generates these messages ( or events ) is called an Event Source

Event Delegation Model is based on four concepts:

The Event Classes

The Event Listeners

Explicit Event Enabling

Adapters

The modern approach to handling events is based on the delegation event model, which defines standard and consistent mechanisms to generate and process events. Its concept is quite simple: a source generates an event and sends it to one or more listeners. In this scheme, the listener simply waits until it receives an event. Once received, the listener processes the event and then returns. The advantage of this design is that the application logic that processes events is cleanly separated from the user interface logic that generates those events. A user interface element is able to "delegate" the processing of an event to a separate piece of code.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Which highest level event class of the event delegation model?

The java.util.EventObject class is the heighest-level class in the event-delegation model class hierarchy.


What is the explanation for the swing delegation event model?

The Swing delegation event model in Java is based on the principle of event listeners and event sources. In this model, components (like buttons or text fields) act as event sources that generate events when user interactions occur. These events are then processed by registered listeners—objects that implement specific interfaces to handle particular types of events. This decouples the event generation from event handling, allowing for flexible and modular code design, as multiple listeners can respond to the same event source.


What are the steps used in delegation event model?

The delegation event model involves three main steps: first, an event is triggered by a user interaction, such as a click or keypress. Second, the event bubbles up through the DOM hierarchy, allowing parent elements to listen for and handle the event. Finally, the appropriate event handler is executed, allowing the desired action to take place in response to the event. This model promotes efficiency by reducing the number of event listeners needed on individual elements.


How to use MVC in Swing Application?

MVC stands for Model View & Controller. In Swings you can use this as follows: Model - Java Beans View - JFrames & JPanels Controller - Event Handlers


What are the advantages and disadvantages event handler to event properties?

what are the advantages and dis advantages of event handling in java


What is java utility?

Java.util package contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes.


A representation of an object or event?

A representation of an object or event is a model.


Do you need a model for your project or event?

Are you in need of a model for your project or event?


What is A delegation of authority?

A delegation of authority:


Why is itemstatechanged method called thrice on changing an item in java swings?

http://docs.oracle.com/javase/7/docs/api/java/awt/event/ItemListener.html#itemStateChanged%28java.awt.event.ItemEvent%29 "http://docs.oracle.com/javase/7/docs/api/java/awt/event/ItemListener.html#itemStateChanged%28java.awt.event.ItemEvent%29"


Which classes are used in java to create client server model?

we use sockets for client server model..


Is Variable declaration in event handlers begin with keyboard declar?

No. There is no such keyword as declar in Java.