PPT Slide
We normally think of events as user-driven actions. But the mere passage of time is an event that Swing components can observe--all without the use of additional threads.
Java provides the javax.swing.Timer object--something of an ‘egg timer’ that allows one to have an event fired periodically without user interaction:
Timer t = new Timer(500, this);
Possible Solution: Use Timers