I'm trying to create a transparent scene with JavaFX. The only way I've been able to get it to work is if the stage style is also transparent. Is there a way to make the scene transparent without also making the window decoration transparent?
Group root = new Group();
Image img = new Image("file:///Untitled.gif");
ImageView view = new ImageView(img);
root.getChildren().add(view);
Scene scene = new Scene(root, 400, 400, Color.TRANSPARENT);
stage.setScene(scene);
// Doesn't work if you comment out this line
stage.initStyle(StageStyle.TRANSPARENT);
stage.show();