Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 Java中暂停/恢复SwingWorker ?
您可以通过实现类似这样的东西来暂停您在 swing worker 中运行的任务
while(true) { if(paused) { try { Thread.sleep(500); // half a second continue; } catch(InterruptedException e) { } } }
虽然不是很好。