1 Reply Latest reply: Dec 20, 2012 11:22 AM by gimbal2 RSS

    Threads updating Swing

    978140
      Hi. I noticed that when trying to add text to a textbox:
      myJTextArea.append("abc");
      From a Thread:
      loop 100 times{
      call append()
      }>
      My application hangs.

      But when I add an sleep:
      loop 100 times{
      call append()
      Thread.Sleep(10);
      }>
      It all works fine. Is this correct behavior?
      If it is: can I speed up without Sleep? (synchronize?)