aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to catch an exception from a SwingWorker Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to catch an exception from a SwingWorker" Watch "How to catch an exception from a SwingWorker" New topic
Author

How to catch an exception from a SwingWorker

Luigi Plinge
Ranch Hand

Joined: Jan 06, 2011
Posts: 441

Below is a code exerpt from a JPanel I've made. The ActionListener launches a Runnable class, which works OK.

2 questions:

1) Am I using SwingWorker correctly here? (first time )

2) How do I catch any exception thown by the Runnable launched by the SwingWorker in the doInBackground method? I've had exceptions ocurring but there is no feedback.

Thanks


Luigi Plinge
Ranch Hand

Joined: Jan 06, 2011
Posts: 441

No-one knows?
 
wood burning stoves
 
subject: How to catch an exception from a SwingWorker