public Timer (int delay, ActionListener listener)

Creates a Timer and initializes both the initial delay and between-event delay to delay milliseconds. If delay is less than or equal to zero, the timer fires as soon as it is started. If listener is not null, it's registered as an action listener on the timer.

Parameters:
delay    milliseconds for the initial and between-event delay
listener    an initial listener; can be null

See also:
addActionListener, setInitialDelay, setRepeats