> >> Hello,
> >> I didn't find any information on this subject.
[quoted text clipped - 26 lines]
>
> Rogan
Great !
How do you call a method on the EDT, do you use
SwingUtilities.InvokeLater(new Runner(...
exception(e));
?
Thanks,
Efi
Rogan Dawes - 27 Feb 2007 21:05 GMT
>>>> Hello,
>>>> I didn't find any information on this subject.
[quoted text clipped - 34 lines]
> Thanks,
> Efi
I'd take a careful look at the source for SwingWorker. The concurrency
issues here are quite severe, it seems. It took 3 or more revisions of
SwingWorker by seasoned practitioners before it became robust . . .
Rogan
Michael Rauscher - 28 Feb 2007 10:23 GMT
> How do you call a method on the EDT, do you use
> SwingUtilities.InvokeLater(new Runner(...
> exception(e));
SwingUtilities.invokeLater( new Runnable() {
public void run() {
exception(e);
}
});
You can also implement a method in non-EDT-safe way, too:
public void exception( final Throwable e ) {
if ( SwingUtilities.isEventDispatchThread() ) {
// manipulate the GUI
} else {
SwingUtilities.invokeLater( new Runnable() {
public void run() {
exception(e);
}
});
}
}
Bye
Michael