title: JavaFX refresh Progress Bar within a method
body: <p>I have a javafx Progressbar in my UI and then I have a for loop.
  In every iteration of the for loop this happens:</p>
  
  <pre><code>progressVal += 5.0;
  progress.setProgress(progressVal);
  </code></pre>
  
  <p>And after the whole loop, this happens:</p>
  
  <pre><code>progress.setProgress(100);
  </code></pre>
  
  <p>I now have recognized that the UI controls are only refreshed after the method has finished, so the progress bar wont update until the end and than would be set to 100 imidiatly. </p>
  
  <p>So is it possible so somehow force the UI update, even when the method isn`t finished completly? Or how else could I do this?</p>