Basic HTML version of Foils prepared June 5 99

Foil 56 Event Model - I

From Java Language in the Computer Science Curriculum ADMI Tutorial Duluth Minnesota -- June 3 99. by Geoffrey C. Fox


1 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.
2 An Event Listener is an instance of any class that wants to receive events.
3 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 );

in Table To:


© 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 Sat Jun 5 1999