java - JavaFX - runLater Runnable not called -


i'm using javafx project. during startup have prompt asks data , network class establishes connection server these data. network class working asynchronously , response in callback. depending on response want open new window (stage) callback. executing mainstage.setscene() triggers exception expected - not called javafx application thread, have use platform.runlater(). but:

platform.runlater(new runnable() {      @override     public void run() {          system.out.println("run");     } }); 

never prints "run". why? accountdataprompt.login() function @ end of javafx start-function and, said, network connection runs asynchronously. prompt custom javafx dialog (https://github.com/marcojakob/javafx-ui-sandbox).

thanks.

after scenes completed, javafx application thread stopped. next platform.runlater() not work.

platform.setimplicitexit( false ); 

use above code. solve issue.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -