Repeat SwingWorker
问题 I want to build a JFrame able to run a background task every time a JButton was clicked.currently i am using a swing worker and it wont allow the task to be executed more than once. How can I enable repetition task for SwingWorker with JButton click. public class ScanFileFrame extends JFrame{ JButton btnTicking; JLabel label1; ScanFileFrame(){ JFrame jframe = new JFrame(); jframe.setLayout(new FlowLayout()); btnTicking = new JButton("Start Scanning Files"); label1 = new JLabel("No File