public static CompletionStage < Stage > stageOf ( final String title , final Pane rootPane ) { return FxAsync . computeOnFxThread ( Tuple . of ( title , rootPane ) , titleAndPane -> { final Stage stage = new Stage ( StageStyle . DECORATED ) ; stage . setTitle ( title ) ; stage . setScene ( new Scene ( rootPane ) ) ; return stage ; } ) ; }
Creates a Stage .