Thank you all very much !!

It worked out, and here I attach a simplified version. There's also a
SwingWorker class that treats this more gracefully, but perhaps no extra
complexity is needed.

Regards.




class {

  Thread heavy = null;


  private void jButton1ActionPerformed (java.awt.event.ActionEvent event) {

    Runnable heavyThread = new Runnable() {
          public void run() {

                // HEAVY PROCESSING


                Runnable GUIThread = new Runnable() {
                  public void run() {
                        // Here the GUI effects of the results generated by the heavy 
process
                        textArea1.append("GUIThread\n");
                  }
                }; // GUIThread

                // Puts in the event queue the GUIThread
            javax.swing.SwingUtilities.invokeLater(GUIThread);


          }
        }; // heavyThread

      heavy = new Thread(heavyThread,"heavyThread");
      heavy.start();

  }

}

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to