when you instantiate the new ActionListener you must overwrite the method actionPerformed(), so here is a small example you could use for your code:



JButton b = new JButton("Push me"); //...