Thinking about the design of a application with 2 threads on the client side, where one thread is the UI and one thread is a worker thread that talks with the server.
I can think of 3 ways to set it up:
1. main() starts the UI thread and the worker thread
2. main() starts the UI thread which in turn starts the worker thread
3. main() starts the worker thread which in turn starts the UI thread
Originally, I started out with 3, but now I am thinking it should be 2.
In recent reading, I think I saw 2 being used with the Java class SwingWorker. Is SwingWorker truly viable, or is it more of a textbook example?