I do not recall there is done() in Timer class. Why
don't you want user close the dialog in default way?
If you force user to use OK button to close the
operation, then you have more lucks in using
MessageDialog(). But it would defeat the purpose of
your program.
The way I see it, you probably have problem in
threading. Java is the multithreading language,
powerful but very difficult to debug. Since you apply
Timer, you are save yourself from alot of headache.
But Timer is also in the neighborhood of thread.
Trace your data byte see where's the hell it travels
in your program, main thread, or GUI thread.