Note, that there are other ways to register an action listener on the button.
It is not required to use an anonymous class for that purpose.