You can add all to a Stackpane and make a Region as a veil (visible=true/false).
import javafx.application.Application; import javafx.event.ActionEvent; import javafx.scene.Scene; import javafx.scene.control.Alert; import javafx.scene.control.Button; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.BorderPane; import javafx.scene.layout.Region; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class VeilDemo extends Application { @Override public void start(Stage primaryStage) { // that is the veil Region veil = new Region(); veil.setStyle("-fx-background-color: rgba(0, 0, 0, 0.3)"); veil.setVisible(false); Button btn = new Button(); btn.setText("Open Dialog"); btn.setOnAction((ActionEvent event) -> { Alert a = new Alert(Alert.AlertType.INFORMATION); //veil is only visible when alert window is showing veil.visibleProperty().bind(a.showingProperty()); a.setContentText("The main window should be decorated with a veil."); a.setX(primaryStage.getX() + 200); // This is only for showing main window a.showAndWait(); }); Image img = new Image("https://www.gnu.org/graphics/gnu-head-sm.png"); ImageView iv = new ImageView(img); // this should be the normal root of window BorderPane bp = new BorderPane(iv); bp.setBottom(btn); StackPane root = new StackPane(); root.getChildren().addAll(bp, veil); Scene scene = new Scene(root, 300, 250); primaryStage.setTitle("Hello World!"); primaryStage.setScene(scene); primaryStage.show(); } /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } }
The main window will look like this:

and if the button was clicked, the info window opens and the veil is visibile on the main stage.
