title: How do I update blackberry UI items from a thread?
body: <pre><code>public class PlayText extends Thread {
  
     private int duration;
     private String text;
     private PlayerScreen playerscrn; 
  
     public PlayText(String text, int duration) {
          this.duration = duration;
          this.text = text;
          this.playerscrn = (PlayerScreen)UiApplication.getUiApplication().getActiveScreen();
     }
  
  
  
      public void run() {
          synchronized(UiApplication.getEventLock()) {
              try{
                  RichTextField text1player = new RichTextField(this.text, Field.NON_FOCUSABLE);
                  playerscrn.add(text1player);
                  playerscrn.invalidate();
  
                  Thread.sleep(this.duration);
  
                  RichTextField text2player = new RichTextField("hahhaha", Field.NON_FOCUSABLE);
                  playerscrn.add(text2player);
                  playerscrn.invalidate();
  
                  Thread.sleep(1000);
                  RichTextField text3player = new RichTextField("Done", Field.NON_FOCUSABLE);
                  playerscrn.add(text3player);
                  playerscrn.invalidate();
  
              }catch(Exception e){
               System.out.println("I HAVE AN ERROR");
              }   
          }
      }
  }
  </code></pre>
  
  <p>With the above code I'm trying to create a small text player.<br /> 
  Instead to get all the text labels one by one, something like<br />
  <br />
  display text1player<br />
  wait this.duration milliseconds<br />
  display text2player<br />
  wait 1000 milliseconds<br />
  display text3player<br />
  thread done.<br />
  <br />
  The screens waits this.duration + 1000 milliseconds and displays all the labels at once.
  I tried with a runnable and calling .invokeLater or .invokeAndWait but I still get the same behavior, and even if I get dirty like above using synchronized it still doesn't work. 
  <br />
  Does anyone know how I can display each label at a time?
  <br />
  Thank you!</p>