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