public static < T extends Pane > CompletionStage < T > setContent ( final T parent , final Node content ) { return FxAsync . doOnFxThread ( parent , parentNode -> { parentNode . getChildren ( ) . clear ( ) ; parentNode . getChildren ( ) . add ( content ) ; } ) ; }
Sets as the sole content of a pane another Node . This is supposed to work as having a first Pane being the wanted display zone and the second Node the displayed content .