title: Trouble with SwingUtilities.invokeLater() updating GUI
body: <p>I have been trying this all day in different variations with little success.  Could someone please help explain what I am doing wrong?  I am just a beginner with regards to threads.</p>
  
  <pre><code>private JTextArea text = new JTextArea();
  private JButton button = new JButton("Cancel");
      public StatusFrame() {
          text.setEditable(false);
          this.add(text);
          this.add(button, BorderLayout.EAST);
          this.setSize(new Dimension(150, 100));
          this.setVisible(true);
      }
  
      public void updateStatus(String textIn) {
          text.setText(textIn);
      }
  
      public JButton getButton() {
          return button;
      }
  </code></pre>
  
  <p>In another class, I am calling methods which may take a while to complete.  I want to be able to call the StatusFrame.updateStatus() method to keep the user informed on the progress.
  This is what I have:</p>
  
  <pre><code>someMethod() {
      // prevent GUI from freezing using threads
      final Runnable r = new Runnable() {
          public void run() {
              status = new StatusFrame();
          }
      };
      SwingUtilities.invokeLater(r);
  
  //do something 
      status.update("process 1 completed");
  //do something else
      status.updateStatus("Process 2 completed");
  }
  </code></pre>
  
  <p>The frame appears but none of the code after the runnable appears to be run/processed.  It just stops/blocks/something.  But the GUI remains active </p>
  
  <p>Thanks for any advice.</p>
  
  <p>P.S.: I have tried using <code>invokeAndWait()</code> method but again not sure if I am doing it the right way.  For now a quick fix would be preferred as I have not learned much about threads yet.  Any instructions are welcome.</p>