acm.util
Class SwingTimer
java.lang.Object
javax.swing.Timer
acm.util.SwingTimer
- All Implemented Interfaces:
- Serializable
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
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 |
SwingTimer
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.
- Parameters:
rate
- The number of milliseconds between tickslistener
- The ActionListener
receiving the events