How is this problem usually resolved?
Usually you override the Swingworker.done() method. Running on the GUI thread is executed when your background thread is completed. Then you can safely call get without blocking and do whatever you need.
Here is one way to do this:
public class Worker extends SwingWorker<Integer, Integer> { private GeneralUserInterface gui;
However, this may not be the most convenient design. I believe that it is best to use GUI material as an open class, and then create a working swing as a non-static inner class. Thus, the done method has easy access to all private GUI variables.
source share