I'm a bit lost on this. So here's some code for an ActionListener:
public static void main(String[] args)
{
ActionListener listener = new ActionListener(){
public void actionPerformed(ActionEvent event){
System.out.println("hello");
}
};
Timer displayTimer = new Timer(5000, listener);
displayTimer.start();
}
And it prints hello over and over... I don't quite understand. why doesn't it just print once?
thanks