May be this is trivial, I am struggling to understand a simple documentation on SwingWorker.
Here is the copy pasted content
There are three threads involved in the life cycle of a SwingWorker :
Current thread: The execute() method is called on this thread. It schedules SwingWorker for the execution on a worker thread and returns immediately. One can wait for the SwingWorker to complete using the get methods.
Worker thread: The doInBackground() method is called on this thread. This is where all background activities should happen. To notify PropertyChangeListeners about bound properties changes use the firePropertyChange and getPropertyChangeSupport() methods. By default there are two bound properties available: state and progress.
Event Dispatch Thread: All Swing related activities occur on this thread. SwingWorker invokes the process and done() methods and notifies any PropertyChangeListeners on this thread.
Often, the Current thread is the Event Dispatch Thread.
The worker thread is not the EDT, hence the code in doInBackground() must not access GUI elements. Is my understanding correct?
We have small code that uses SwingWorker but has doInBackground() createing FileChooser and calling
setCurrentDirectory(). I suspect that is leading me exception almost same as http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6637181 ( 11-Closed, Not a Defect)