I'm creating a JFXDialog using a FXMLFile as Content for it, it's a StackPane that contains a ProgressIndicator, i'm trying to change the JFXDialog's background to Transparent, this is my CSS:
And this is my Java Code:
`//Obtención del parent con la ruta del fxml a usar
Parent parent = FXMLLoader.load(getClass().getResource("../Vista/Loading_Screen.fxml"));
parent.setStyle("-fx-background-color: TRANSPARENT;");
//Creación del Dialog usando el Parent como Region (cast) para poder personalizarlo:
JFXDialog dialog = new JFXDialog();
dialog.setContent((Region) parent);
Background background = new Background(new BackgroundFill[]{new BackgroundFill(Color.TRANSPARENT, new CornerRadii(2.0D), (Insets)null)});
dialog.setBackground(background);
System.out.println(dialog.getBackground().getFills().get(0).getFill());
//Se muestra el dialog:
dialog.show(StackPane1);`
I'm creating a JFXDialog using a FXMLFile as Content for it, it's a StackPane that contains a ProgressIndicator, i'm trying to change the JFXDialog's background to Transparent, this is my CSS:
And this is my Java Code:
`//Obtención del parent con la ruta del fxml a usar Parent parent = FXMLLoader.load(getClass().getResource("../Vista/Loading_Screen.fxml")); parent.setStyle("-fx-background-color: TRANSPARENT;");