Hi everybody.
I am building an SWT application which serves as a support for a board game (keeping score etc.) and as one of the features it contains a timer as a part of the interface. The idea is to have a label which displays seconds left of the clock and two buttons - start(stop) and reset.
I know this is a typical threading problem - I just need a
thread which would tick every second and notify the label about it. However I can't fathom how to code this. I have tried with Timer and TimerTasks, but I always seem to get "org.eclipse.swt.SWTException: Invalid thread access".
Can someone please help me and tell me how to do this? Thanks!