Is there anyway to pause a Java Swing Timer, i'm planning to implement a feature in this java 2D environment and want the ability to pause the movement graphics.
Asked
Active
Viewed 151 times
3 Answers
0
Timers cannot be paused. You'll have to add the functionality yourself. Here's an example that pauses the timer on mouse over:
http://www.java2s.com/Code/Java/Swing-JFC/Anappletthatcountsdownfromaspecifiedtime.htm

Troncoso
- 2,343
- 3
- 33
- 52
0
There is no way to pause a Swing Timers once started. But you can make use of Timer class setDelay(int delay)
to delay between successive action events

SparkOn
- 8,806
- 4
- 29
- 34