Basic HTML version of Foils prepared July 6 99

Foil 42 Event Model - I

From Use of Java Language in Computational Science DoD Modernization Users Group Conference Monterey -- June 7 99. by Nancy McCracken, Geoffrey C. Fox


The user can interact with the GUI on many of its components, by clicking a button, typing in text, etc. These actions cause an Event to be generated, which will be reported by the system to a class which is an Event Listener, and which will have an event handler method for that event. This method will provide the appropriate response to the user's action.
An Event Listener is an instance of any class that wants to receive events.
An event source is an object that generates events.. An event source will keep a list of event listeners who want to be notified for particular events.
  • button1.addActionListener ( eventclass );



© 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 Tue Jul 6 1999