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
Post a Comment