How do I make my SwingWorker example work properly?
问题 I've made my own SwingWorker example to get familiar with how it works. What I'm wanting to do is the following: When the button is clicked I want a progress bar appear until the task is done I want to simply remove the progress bar and add a string to the dialog. When the button is clicked, the progress bar comes up but never goes away. (never removes the progress bar after 10 seconds and never places the label up) Here is an SSCCE: package swingtesting; import java.awt.event.ActionEvent;