I am building a Swing application in Java.
I've read that in order to run a GUI task periodically it is recommended to use a Timer
object (from javax.swing package). I am trying to understand what is the difference between using the Timer
object vs using the sleep
method for the Thread. Don't they both achieve the same?
Meir