hockeygoalie5
In Runtime
- Messages
- 299
- Location
- United States
I've finished the code, removed the for int i loop and replaced it with a Timer. Now, I need to have the code constantly checking for On because On is dynamic and it's only checking once, if On is true (default false) then the code won't pick it up.
For more explanation, I put a println on the start button's action listener that prints On. Click it, prints true. I also put one in the if statement that prints 'On.'. Click the button, prints true, doesn't print 'On.'.
Code:
if(On) {
Timer timer = new Timer();
timer.schedule(new TimerTask(), 0, 35000);
}
For more explanation, I put a println on the start button's action listener that prints On. Click it, prints true. I also put one in the if statement that prints 'On.'. Click the button, prints true, doesn't print 'On.'.