Interfaces must contain methods which uses the classes object as a parameter. Look at ActionListener Interface, in this interface you will get actionPerformed method. This method uses ActionEvent object. All the backend work is done by ActionEvent object. You must implement your interface in a manner like this.