Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android 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?
 
 
subject: How to catch an exception from a SwingWorker
 
Similar Threads
getting the index of the closest value in an array that is sorted in reverse order
Can any please review following piece of code
Copying Object (such as Button, Label, and personal Objects) ?
For Loop
GUI update.