Well, here is the world as I see it:
1) all of the UI tookits I've ever heard about there is "single thread
rule". In case of Swing this thread is named EDT. They could make it
multithreaded, but "you should allow UI programmer to be dumb ignorant
moron, he is not supposed to know about threads and synchronization".
I don't mind all that stuff about EDT, but the reason of it is
completely wrong to me.
2) eventually that led to concurrency bugs, which are extremely hard
to reproduce. So they established simple rule - "one thread to rule
them all", "thou shall not touch JComponent and it's heirs outside of
EDT". If you worked with Swing starting with Java 1.4 - that rule was
not established at that time, it appeared some time before java 6
release, while source code is basically the same.
3) when everybody started doing everything in EDT - it led to UI
freezing (or graying out) because EDT was busy with some time
consuming tasks and was not able to iterate over "dirty regions" to
repaint them. So they've made SwingWorker to simplify backgrounding of
time-consuming tasks. By time consuming in most cases we mean IO
operations and remote invocation, which are unpredictable, while it's
pretty safe to execute any code while it works only with reasonable
amount of CPU time and RAM. All those methods in SwingWorker are far
from lightweight, for example publish() is gathering all that data in
so called AccumulativeRunnable, collecting all that data into
ArrayList, and then that AccumulativeRunnable is submitted to EDT and
you'll get that list in publish(). Or creation of real Thread instance
in execute() method...
So as for me - it's completely correct to initialize GUICE and
construct SwingWorker inside EDT, as long as your UI is not frozen by
those operations. Just try to construct and show JFileChooser and see
for how long it will freeze your UI before actually showing itself and
I am almost sure that you will be completely happy with your solution.