Basic HTML version of Foils prepared 19 July 97

Foil 4 AWT New Event Model

From Overview of JDK Version 1.1 Extensions CPS616 -- Information Track of CPS -- Spring Semester 97. by Nancy J. McCracken


In old event model, the native windowing system reported events to the eventHandler of class Component, who decided which component should get the event and to call a particular event handler for that event, such as "action" or "mouseDown".
In the new event model, event handling has been more generalized: each class can declare which events it wants to handle by creating an ActionListener for those events.
  • Required more generalized event model for JavaBeans.
  • Essential for user to create own basic (lightweight) components.
  • More detailed system of events: e.g. user can create own button component which enables events MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_ENTERED, and MOUSE_EXITED and may make the button change appearance (or take other action) on each of these events.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998