What is Event Delegation Model



Event Delegation Model

Wen the user generates an event, the component delegates(handovers) that event to a listner.

Listener is an interface that contains same methods, so Listener will delegate the event to one of the methods, finally the method is executed and the event is handled, this is called event delegation model.

Event delegation model is used to provide action for awt Components

In event delegation model we should flow the steps.

– - – > Add a (suitable ) Listener to the component

– - – > Implement all the methods of the Listener

– - – > When the user interacts with the components listener call’s the methods and the method will handle the event.

Random Posts

  • Define ServletOutputStream object in Jsp
  • J2EE Interview Questions
  • Can we call destroy() method on servlets from service method
  • Jdbc Interview Questions
  • Define Precompile of Jsp page

Post a Comment