0
Well my doubt is the following, I would like to apply an effect in which, when I open a new window, the window that was superimposed is blurred I tried to use
public Stage stageModal(String controller, String titulo){
try {
AnchorPane root = new AnchorPane();
root = FXMLLoader.load(getClass().getResource("/com/ProcessosJuridicos/view/"+controller+".fxml"));
root.setStyle("-fx-background-color: black");
Scene scene = new Scene(root);
final Stage stage = new Stage();
stage.setScene(scene);
stage.setTitle(titulo);
GaussianBlur blur = new GaussianBlur(55);
ColorAdjust adj = new ColorAdjust(0, -0.9, -0.5, 0);
adj.setInput(blur);
root.setEffect(adj);
stage.initModality(Modality.APPLICATION_MODAL);
stage.show();
return stage;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
the way I tried to do it applies the "effect" on the window in which it was opened