Loading
EVENT DELEGATION MODEL

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What is the differance between EventModel 1.0 and EventModel 1.1 ? Or "Delegation Event Model" ?


Ans)

Event Model 1.0 :

The model for event processing in version 1.0 of the AWT is based on inheritance. In order
for a program to catch and process GUI events, it must subclass GUI components and override
either action() or handleEvent() methods.
Returning "true" from one of these methods consumes
the event so it is not processed further; otherwise the event is propagated sequentially up
the GUI hierarchy until either it is consumed or the root of the hierarchy is reached.

The inheritance model does not lend itself well to maintaining a clean separation between the
application model and the GUI because application code must be integrated directly into the subclassed
 components at some level.

Event Model 1.1 (Delegation Model Overview) :

Event types are encapsulated in a class hierarchy rooted at java.util.EventObject. An event is
propagated from a "Source" object to a "Listener" object by invoking a method on the listener
and passing in the instance of the event subclass which defines the event type generated.

 

 



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

EVENT DELEGATION MODEL


EVENT DELEGATION MODEL

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free