There is only one action event--when the user clicks on the only button. So the action listener does not need to check which component caused an event.
The user clicks the "Do It!" button
after entering numeric text in the top
two JTextFields
.
This generates an ActionEvent
which is passed to the registered listener for the button,
in this case the same object as contains the button.
That object implements ActionListener
which
means that it has an actionPerformed()
method.