title: Progress Bar does not update Immediately
body: <p>I am attempting to use <strong>both a Progress Bar and a Label</strong> to show the <strong>progress</strong> of a discreet number of operations.  Every time I update both, <strong>the label updates immediately, while the progress bar has a noticeable delay before it changes</strong>.</p>
  
  <p>I have a test dialog where, when I press a button, I update both the label and the progress bar to reflect an increase of 1.  This happens immediately in the code without any loops or threads being called (<strong>eliminating any threading-related issues as being the cause</strong>) - just a simple changing of values.  When this happens, the Label updates immediately, while the Progress Bar waits for about half a second before updating visually.  This leads to instances where it will say, for instance, "2 out of 3" when it briefly but noticably shows 1/3 of the bar filled.</p>
  
  <p><img src="https://i.stack.imgur.com/dhbuI.png" alt="enter image description here"></p>
  
  <pre><code>import org.eclipse.swt.SWT;
  import org.eclipse.swt.layout.GridLayout;
  import org.eclipse.swt.widgets.Display;
  import org.eclipse.swt.widgets.Shell;
  import org.eclipse.swt.widgets.ProgressBar;
  import org.eclipse.swt.widgets.Label;
  import org.eclipse.swt.layout.GridData;
  import org.eclipse.swt.widgets.Button;
  import org.eclipse.swt.events.SelectionAdapter;
  import org.eclipse.swt.events.SelectionEvent;
  
  public class ProgressBarTest extends Shell {
  
      private ProgressBar progressBar;
      private Label lblXOfX;
      private Button btnGo;
  
      public static void main(String args[]) {
          try {
              Display display = Display.getDefault();
              ProgressBarTest shell = new ProgressBarTest(display);
              shell.open();
              shell.layout();
              while (!shell.isDisposed()) {
                  if (!display.readAndDispatch()) {
                      display.sleep();
                  }
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
      public ProgressBarTest(Display display) {
          super(display, SWT.SHELL_TRIM);
          createContents();
      }
  
      protected void createContents() {
          setText("SWT Application");
          setSize(450, 300);
          setLayout(new GridLayout());
  
          progressBar = new ProgressBar(this, SWT.NONE);
          progressBar.setMaximum(3);
          progressBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  
          lblXOfX = new Label(this, SWT.NONE);
          lblXOfX.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
          lblXOfX.setText("x of x");
  
          btnGo = new Button(this, SWT.NONE);
          btnGo.addSelectionListener(new SelectionAdapter() {
              @Override
              public void widgetSelected(SelectionEvent arg0) {
                  go();
              }
          });
          btnGo.setText("Go");
      }
  
      @Override
      protected void checkSubclass() {
          // Disable the check that prevents subclassing of SWT components
      }
  
      protected void go() {
  
          int iCur = progressBar.getSelection();
          iCur++;
          if (iCur &gt; progressBar.getMaximum())
              iCur = 0;
  
          progressBar.setSelection(iCur);
          lblXOfX.setText(String.format("%s of %s", iCur, progressBar.getMaximum()));
      }
  
  }
  </code></pre>
  
  <p>This occurs despite using the Progress Bar's internal variable to keep track of the value, and using that value to update the label.</p>
  
  <p>Notably, <strong>changing the progress bar's "State" property</strong> to "ERROR" or "PAUSED" eliminates the issue.</p>
  
  <p>Is this some sort of bug with animation?  <strong>Is this just an issue with a specific version of Windows</strong>, such as the Windows 7 that I am using?  Or is it something else?</p>