Dialog with swingworker is a chicken/egg

后端 未结 2 592
無奈伤痛
無奈伤痛 2021-01-24 06:25

I am trying to follow the Java best practices by not doing long tasks on the main thread (EDT). So I am planning to use a swingWorker with Modal Dialog. This way the modal dialo

2条回答
  •  执笔经年
    2021-01-24 06:47

    You can try SwingUtilities.invokeLater and SwingUtilities.invokeAndWait instead of swingWorker.

    Also, this topic may be useful.

提交回复
热议问题