title: Updating main GUI Elements in Java Swing
body: <p>I'm trying to update the main gui in a java swing application, so there is a runnable thread that keeps the main gui visible, but the problem is it is called in main, and main is a static function. I would like to say Element.SetTtext. But all calls that I want to update are not static. How can I update the lables,..etc in the Main GUI then?</p>
  
  <pre><code>public static void main(String args[])
      {
          java.awt.EventQueue.invokeLater(new Runnable() {
              public void run() 
              {
                  new AGC().setVisible(true);
            // code to update labels here
              }
          });
      }
  </code></pre>