Mega Code Archive

 
Categories / Java Tutorial / Swing
 

Timer Properties

The coalesce property allows for a busy system to throw notifications that haven't happened yet when a new event needs to be fired. This means if a timer runs every 500 milliseconds, but its system is bogged down and doesn't respond for a whole 2 seconds, the timer needs to send only one message, rather than also sending the missing ones. If the setting were false, four messages would still need to be sent. By default, the coalesce value is true.