Just to make sure, this is what I mean:
public static void someMethod()
{
JButton btn = new JButton();
btn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
// Do something...
}
});
}
So when adding an ActionListener to the button, I create a new ActionListener and a new method inside a method - but what is this implementation of an ActionListener called?