FileDocCategorySizeDatePackage
ButtonDemo2b.javaAPI DocExample699Sun Mar 11 21:28:34 GMT 2001None

ButtonDemo2b

public class ButtonDemo2b extends Applet
Demonstrate use of two buttons, using a single ActionListener made of a named inner class

Fields Summary
Button
b1
Button
b2
ActionListener
handler
Constructors Summary
Methods Summary
public voidinit()


	   
		add(b1 = new Button("A button"));
		b1.addActionListener(handler);

		add(b2 = new Button("Another button"));
		b2.addActionListener(handler);