Class SwingTimer

  extended by javax.swing.Timer
      extended by acm.util.SwingTimer
All Implemented Interfaces:

public class SwingTimer
extends Timer

This class is equivalent to javax.swing.Timer and exists only to avoid the ambiguity that arises because there is also a Timer class in java.util.

See Also:
Serialized Form

Field Summary
Fields inherited from class javax.swing.Timer
Constructor Summary
SwingTimer(int rate, ActionListener listener)
          Creates a new timer that ticks at the specified rate.
Method Summary
Methods inherited from class javax.swing.Timer
addActionListener, fireActionPerformed, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SwingTimer(int rate,
                  ActionListener listener)
Creates a new timer that ticks at the specified rate. On each tick, the timer sends an ActionEvent to the listener.

rate - The number of milliseconds between ticks
listener - The ActionListener receiving the events