This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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?
 
jQuery in Action, 2nd edition
 
subject: How to catch an exception from a SwingWorker