question on timer to print something

hi i wanted to make use of timer to do println of an array with delay of 2sec interval and end the timer once end of array. how do i use timer to do that?

i have tried to use

Timer timer =new Timer(2000,this);

timer.start();

but i do not know where to do the printing and stopping of the timer.

Thanks in advance~~~

[420 byte] By [echizena] at [2007-11-26 13:28:11]
# 1
Read Timer API !! When using a timer You need ActionListener, where You define actionPerformed by listener.Be careful to pick right timer (swing one)
hellbindera at 2007-7-7 20:30:32 > top of Java-index,Desktop,Core GUI APIs...