Have you written your own ActionListener interface? If so then don't. You are trying to add your own Listener to the button but it is expecting an Listener from the awt.event package to be added....