I have a simple problem that I'am unable to resolve. If I run this example at the time of printing "AFTER" Scene is not rendered, only empty Stage. If I do runLater the sequence is in order - scene is rendered before "AFTER LATER". How can I wait in code for render (Quantum Toolkit) to complete?
public final void start(final Stage primaryStage)
{
Button btn = new Button("Hello World!");
StackPane root = new StackPane();
root.getChildren().add(btn);
primaryStage.setScene(new Scene(root, 300, 250));
primaryStage.show();
// TODO - wait for render?
System.out.println("AFTER");
Platform.runLater(() -> System.out.println("AFTER LATER"));
}