title: How to change value of progress bar and label?
body: <p>The <code>JLabel</code> and <code>JProgressBar</code> do not change their value, only when the method ends.</p>
  
  <pre><code>this.desSave.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
          DownloadXml();
      }
  });
  
  private void DownloadXml() throws Exception {
      Integer a = 456;
      int value = (1000 / a) - 1;
      this.numDes.setText("0" + "/" + a);
      for (int i = 0; i &lt; a; i++) {
          saveXml(ligas.get(i),i,path);
          this.numDes.setText(i + "/" + a); //this is a jlabel
          this.progressbar.setValue(value * i); //jprogressbar
      }
  }
  
  private void SaveXml(String xml,int a,String path) throws IOException {
  }
  </code></pre>