Beware: Complicated and confusing post to follow.
There are two sorts of Timer, which work slightly differently. You can read about the other one (Swing)
here. Then you can decide which sort is better for your current requirements. If the Swing Timer works in the Event Dispatch
Thread (EDT), you may find it blocks your entire GUI, in which case you will want the other Timer. In Timer, it suggests
this link will help; I haven't read it.
Remember you need to enter the EDT so your Timer or TimerTask would have to enter it: start reading
here.
Actually, there is a third kind of Timer (Management) in the API.