> Hi All,
>
[quoted text clipped - 13 lines]
>
> Bill
The issue here probably is the fact that Java doesn't get the time to
repaint the scrollpane/table.
To solve this allow remove control from your traverse thread (hopefully
this is a different thread then the event thread) for a short period by
using Thread.yield() or thread.sleep(50).
Regards,
Bart
Bill - 24 Nov 2006 11:40 GMT
Hi Bart,
I'll give it a try.
Thanks
Bill
>> Hi All,
>>
[quoted text clipped - 27 lines]
>
> Bart
Ian Wilson - 24 Nov 2006 11:51 GMT
>>Hi All,
>>
[quoted text clipped - 20 lines]
> this is a different thread then the event thread) for a short period by
> using Thread.yield() or thread.sleep(50).
I wonder if thread priorities might also be an issue?
On my non-GUI worker threads I use
t.setPriority(Thread.NORM_PRIORITY);
before invoking
t.start();.
Just a thought.
> Hi All,
>
[quoted text clipped - 13 lines]
>
> Bill
Without seeing your code I can only guess, but you've probably hijacked the EDT
to do your processing. Whilst the EDT is processing your code it can't get on
with what it's supposed to be doing, updating the GUI.
Whatever processing you are doing which calls jTable.scrollRectToVisible(r);
must be done in a thread other than the EDT if you want to see the effects of
that method. Also, note that JComponent.scrollRectToVisible() doesn't say it's
thread safe, so if you want to use it from another thread then you really ought
to wrap that call in a SwingUtilities.invokeLater().
I was going to recommend the section in the Java Tutorial "Creating a GUI with
JFC/Swing", but Sun seem to have re-written this for Java 1.6. The tutorial now
only mentions the use of SwingWorker for creating multiple threads in Swing
(SwingWorker isn't even part of Java 1.5, it's a separate download).

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555