The event handler method named actionPerformed
Once the listener object is instantiated from the anonymous class
- and registered on
the button,
- the method named actionPerformed,
- which begins in Listing 4
- will be executed each time the button is clicked.