I have strange problem. I set a JProgressBar:
private JProgressBar progressBar; public void foo() { ... progressBar = new JProgressBar(0, 100);
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.