title: java jprogressbar hangs during heavy operation
body: <p>I'm writing a java program and, before I call a method that makes heavy use of the CPU, I display a frame with a JProgressBar on it. Although I display it before the method is called, the JProgressBar is not shown until the method is over. The progress bar does not interact with the method in any way (yet) and that's why I am confused. It is something like:</p>
  
  <pre><code>progressbarframe.setVisible(true); // it is a indeterminate progress bar
  heavyLoadMethod();
  progressbarframe.dispose();
  </code></pre>
  
  <p>The frame shows, but the progress bar doesn't initialize during the method. Is there any way I can solve this without using threads? What would be the simplest way?</p>
  
  <p>Thank you for your time</p>