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
1 Any class that intends to "listen" for an ActionEvent must implement the ActionListener interface
2 To register the applet as a listener of button events, type the following: Button button = new Button(...); button.addActionListener( this );
3 The keyword this refers to the current applet

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 Nov 28 1998