Hi Peter, welcome to the ranch.
If your class implements ActionListener, you must implement all methods of that interface. There's only one method in that interface, actionPerformed, so you have to implement it, and use "quitItem.addActionListener(this);".
Or, you can just remove the "implements ActionListener" part, and leave your code as is. But as many buttons will be using your ActionListener, so I think
you should leave "implements ActionListener", and implement the actionPerformed method.
The important thing to remember is that you need to pass an ActionListener to the addActionListener method. You can choose to create an anonymous class, like you did by having new ActionListener() in addActionListener. Or you can choose to implement ActionListener and pass your class to addActionListener.
PS: Next time you post code, please
UseCodeTags to make your source more readable.