Basic HTML version of Foils prepared 13 July 98

Foil 63 Buttons

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

Buttons for Foil 63
Adding a button to an applet is just as easy: add( new Button( "Red" ) );
This statement adds a button with label "Red"
The problem is that nothing happens when you press the button! First you must write a "handler" that handles button events
A button event is a type of event called an ActionEvent



© 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