title: How to use "Scheduler.get().scheduleDeferred" the right way in GWT?
body: <p>Here is my Pseudocode in my GWT app.</p>
  
  <pre>
  -Visible the loading Label
  -Loading text from properties file (may take long)
  -Invisible the loading Label & Visible the main HTMLPanel
  </pre>
  
  <p>So I want to use <code>Scheduler.get().scheduleDeferred</code> to achive that, here is the code:</p>
  
  <pre><code>loadingLabel.setVisible(true);
  Scheduler.get().scheduleDeferred(new ScheduledCommand() { 
    @Override
    public void execute() {
     loadingText();
    }
  }
  loadingLabel.setVisible(false);
  mainHTMLPanel.setVisible(true);
  </code></pre>
  
  <p>But it doesn't work correctly as it did not show the loadingLabel but show the mainHTMLPanel immediately &amp; when i click a textbox inside the mainHTMLPanel since the Gui got frozen cos it is loading text. Then I have to wait for a while to be able to click the textbox inside mainHTMLPanel.</p>
  
  <p>But if i put <code>loadingLabel.setVisible(false);</code> &amp; <code>mainHTMLPanel.setVisible(true);</code> inside <code>execute()</code> Then it works. </p>
  
  <p>But i am not sure that is the right way to do. </p>
  
  <p>So, is the following code the right way to use <code>Scheduler.get().scheduleDeferred</code>?</p>
  
  <pre><code>    loadingLabel.setVisible(true);
      Scheduler.get().scheduleDeferred(new ScheduledCommand() { 
        @Override
        public void execute() {
         loadingText();
         loadingLabel.setVisible(false);
         mainHTMLPanel.setVisible(true);
        }
      }
  </code></pre>