Basic HTML version of Foils prepared 13 July 98

Foil 67 Handling Button Events

From Java Academy II:Intermediate Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo


Pressing a button generates an ActionEvent
An ActionEvent is "handled" by the actionPerformed(...) method of the ActionListener interface
A Java event is like the proverbial tree in the woods: nobody will hear it unless someone is listening! So our button applet must "register" itself as a listener of button 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 Sat Nov 28 1998