Wie ändere ich den Wert der Fortschrittsanzeige und der Beschriftung?

DasJLabel undJProgressBar Ändere ihren Wert nicht, nur wenn die Methode endet.

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 < 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 {
}

Antworten auf die Frage(2)

Ihre Antwort auf die Frage