I have a problem while working with JavaFX and Threads. Basically I have two options: working with Tasks
or Platform.runLater
. As I understand Platform.runLater
should be used for simple/short tasks, and Task
for the longer ones. However, I cannot use any of them.
When I call Thread
, it has to pop up a captcha dialog in a middle of task. While using Task
, it ignores my request to show new dialog... It does not let me to create a new stage.
On the other hand, when I use Platform.runLater
, it lets me show a dialog, however, the program's main window freezes until the pop up dialog is showed.
I need any kind of solution for this. If anyone knows how to deal with this or had some similar experience and found a solution I am looking forward to hearing from you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…