When you declare your class you need to specify that it implements the ActionListener interface:
Code:
class tester implements ActionListener {
otherwise the compiler won't know it can treat your class as an ActionListener and give you the error you mentioned when you try to pass it to a method that takes an ActionListener as a parameter.
shmoove