The ActionEvent Class
ActionEvent is a class in the core package java.awt.event
The most important method in this class is: public String getActionCommand();
We will use this method to process an ActionEvent generated by a button, but first we need to understand what a Java interface is…