更新时间:2023-02-01 13:26:50
当Swing程序需要执行长时间运行的任务时,通常使用工人线程之一,也称为后台线程.
When a Swing program needs to execute a long-running task, it usually uses one of the worker threads, also known as the background threads.
看看 SwingWorker 和使用Swing Worker线程.
另请阅读 Swing中的并发有关GUI冻结原因的信息,以及有关使用Swing Worker的工作示例的信息. (通过@camickr)
also Read up on on Concurrency in Swing for more information on why the GUI freezes and for a working example of using a Swing Worker. (via @camickr)