ProgressBar doesn't change its value in Java

后端 未结 2 516
故里飘歌
故里飘歌 2021-01-18 08:48

I have strange problem. I set a JProgressBar:

private JProgressBar progressBar;

public void foo()
{
    ...
    progressBar = new JProgressBar(0, 100);
             


        
2条回答
  •  花落未央
    2021-01-18 09:27

    Even though this question was answered already I've found another way that actually worked for me. I was using the swing worker and using propertyChange(null) to update the progress bar was the easiest solution.

    Just wanted to offer this alternative.

提交回复
热议问题