Having a few problems restarting a timer.
Currently using 2 timers, both begin like:
javax.swing.Timer t = new javax.swing.Timer(30000, new ActionListener() {
and
javax.swing.Timer moving = new javax.swing.Timer(10000, new ActionListener()
{
These both work fine on their own, but now when it comes to starting the
timer again, it doesnt know which one to start
Before when i was only using one timer, i was doing: new Timer() but now
it wont know what to start, ive tried new Timer(t) but i get the error
message:
cannot resolve symbol
symbol : constructor Timer (javax.swing.Timer)
location: class java.util.Timer
new Timer(t);
import java.util.Timer.*; is already imported..
Any ideas? i need to be able to make those new timers run again, like make a
new instance of it, not just .start again
Cheers
Advocated - 07 Dec 2003 17:39 GMT
> Having a few problems restarting a timer.
> Currently using 2 timers, both begin like:
[quoted text clipped - 23 lines]
>
> Cheers
Helps if i do, t.restart() :p