if (event.target == b1)
showStatus("Thanks for pushing my first button!");
else if (event.target == b2)
showStatus("Thanks for pushing my second button!");
else showStatus("Huh?");
return true;
public void
init()
add(b1 = new Button("A button"));
add(b2 = new Button("Another button"));