SwingWorker is an implementation of a common template (in .Net I read that GuiWorker BackgroundWorker is used for this), where you need to do some work in the GUI, but support the GUI. The problem is that often GUI libraries are not multi-threaded, so a common way to implement such workers is to use the library's message loop to send messages to the application event loop.
These classes make it easy to update the GUI. Usually they have an update(int status) method that is called by the thread, dispatched by the class and processed by the graphical interface, and the thread continues to work.
Using regular streams, you will need to code your own events or some other messaging engine for this task, which can be painful if you need this feature often. For example, using invokeLater in Java, you have to mix code to update gui in code to get the job done. SwingWorker lets you keep things separate.
Johannes Schaub - litb
source share