Differences between SwingWorker and Executor

前端 未结 2 597
猫巷女王i
猫巷女王i 2021-02-15 15:25

I am using SwingWorker to execute some heavy load tasks on an application I am making . Although today I got across the Executor class and this example :

Executo         


        
2条回答
  •  旧时难觅i
    2021-02-15 15:56

    The SwingWorker has additional methods process() and done() which are automatically executed in the event dispatch thread. This comes in handy if you plan to display your progress or final results in a user interface.

提交回复
热议问题