1 | The last step is to connect the button to the actionPerformed method by registering that the applet is the class ready to "listen" for button events: button1.addActionListener ( this ) ; |
2 | The keyword this refers to the current applet. |
3 | Note that many buttons can add ActionListener and the one actionPerformed method should have code sections for each button. |
4 |