title: actionListener interfaces actionPerformed method not working with Timer class
body: <p>the following program is suppose to print the date after every second. however this is not working for an known reason.</p>
  
  <p>i have implemented the ActionListener interface in the following class and the actionPerformed method:</p>
  
  <pre><code>import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.util.Date;
  
  public class CurrentTimePrinter implements ActionListener{
  
          public void actionPerformed(ActionEvent e){
          System.out.println(new Date());
  
      }
  }
  </code></pre>
  
  <p>this is the tester class:</p>
  
  <pre><code>import java.awt.event.ActionListener;
  import javax.swing.Timer;
  
  
  public class CurrentTimePrinterTester {
  
      public static void main(String[] args) {
          ActionListener listener = new CurrentTimePrinter();
  
          Timer t = new Timer(1000, listener);
          t.start();
      }
  }
  </code></pre>