Swing threading model
The single thread model for Swing really places a burden on developers, and even when we manage to figure out how to make it work we end up with some very messy code.
You can't block the event dispatch thread, so you fork a new thread to deal with a slow task... but then your slow task needs to update the UI occasionally, so you have to deal with SwingUtilities.invokeLater(), or in some cases invokeAndWait. But invokeAndWait can cause a deadlock, so
you've gotta be careful with that.
Yes I know about SwingWorker- it's an OK solution for the simple case. But in any moderate to complicated Swing app it's very easy to get lost jumping into and out of the event dispatch thread.
Can we find some way to fix this? The modal dialog seems to do it- it blocks the calling thread, yet allows the GUI to remain responsive. I believe this is what the Foxtrot folks are using. The threading issue is a major hurdle to good, responsive GUI app development, and a standard solution is really needed.
Thanks for listening.