Re: Handling exceptions in SwingWorker
- From: Michael Rauscher <michlmann@xxxxxx>
- Date: Wed, 28 Feb 2007 11:23:03 +0100
Efi Merdler wrote:
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
.
- References:
- Handling exceptions in SwingWorker
- From: Efi Merdler
- Re: Handling exceptions in SwingWorker
- From: Michael Rauscher
- Re: Handling exceptions in SwingWorker
- From: Rogan Dawes
- Re: Handling exceptions in SwingWorker
- From: Efi Merdler
- Handling exceptions in SwingWorker
- Prev by Date: Re: Parsing or Casting a JtextField? Help requested....
- Next by Date: eclipse
- Previous by thread: Re: Handling exceptions in SwingWorker
- Next by thread: JList as Jtable Render and editor
- Index(es):