Basic HTML version of Foils prepared 13 July 98

Foil 68 The addActionListener Method

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

The java.awt.Button.addActionListener Method
Any class that intends to "listen" for an ActionEvent must implement the ActionListener interface
To register the applet as a listener of button events, type the following: Button button = new Button(...); button.addActionListener( this );
The keyword this refers to the current applet



© 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