Events are processed by one and the same action listener, which distinguishes between buttons and takes one of two actions:
Lots of other things could this applet have done; you will find these exciting, it is hoped.
So this is the last of the programs you are not supposed to be able to understand; only admire functionality at this stage, I guess.