> 
> Here's my explanation:
> the event distributing thread is a higher-priority thread than the 
> repainting one, and this somehow messes up the repaint() call.
> 

Your closee but its worse than that,
If you put a print in your actionperformed method that prints of the
thread id and another one in your paint method, you will unfortunatelly
see they are the same thread at least under solaris and NT I haven't
bothered to look on Linux.  So your right it is a problem but not an
easilly fixed one.

My usual work around and probablly a good idea since you don't want to tie
up your event thread for to long anyway is to have your actionperformed
start up a thread and then return you can use Thread or SwingWorker to do
this java says SwingWorker is the right way but I always forget to use it.

Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
                        you know where to find it
                      -Kane, Johnson, and anonymous

Reply via email to