10-07-2011 07:35 AM
i want to maintain a timer to refresh, if screen is displayed it should run else it should not
currently i am using onObscured to cancel the timer and onExpose to scheduleTimer
but whenever onExpose is being called it gives illeagle state exception.
how can i solve this issue???
10-09-2011 06:10 PM
Are you re-initiating your timer on the OnExpose method?
According to Timer documentation, once you canceled a timer you can't reuse it.
Also, you can use the invokeLater method which seems to me more appropriate to this scenario.
10-10-2011 03:35 AM