my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets 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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to catch an exception from a SwingWorker
 
Similar Threads
Can any please review following piece of code
Copying Object (such as Button, Label, and personal Objects) ?
getting the index of the closest value in an array that is sorted in reverse order
For Loop
GUI update.