/* * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ import javafx.application.Application; import javafx.scene.PerspectiveCamera; import javafx.scene.Scene; import javafx.scene.control.Slider; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.transform.Rotate; import javafx.stage.Stage; import javafx.stage.StageStyle; /** * * @author Alexander Kouznetsov */ public class Bug extends Application { public static void main(String[] args) { launch(args); } @Override public void start(final Stage stage) throws Exception { Image image = new Image("JavaFX.png"); VBox root = new VBox(10); Slider opacitySlider = new Slider(0, 1, 0.5); opacitySlider.setMaxWidth(100); root.getChildren().add(opacitySlider); for (int j = 0; j < 2; j++) { HBox hbox = new HBox(10); hbox.setMouseTransparent(true); for (int i = 0; i < 3; i++) { ImageView imageView = new ImageView(image); imageView.setRotationAxis(Rotate.Y_AXIS); imageView.setRotate(60); imageView.setOpacity(1 - i / 3.); hbox.getChildren().add(imageView); } root.getChildren().add(hbox); if (j == 0) { hbox.opacityProperty().bind(opacitySlider.valueProperty()); } } Scene scene = new Scene(root);//, 1000, 500, true); scene.setCamera(new PerspectiveCamera()); stage.setScene(scene); stage.show(); } }