Example usage for javafx.scene.image ImageView setRotate

List of usage examples for javafx.scene.image ImageView setRotate

Introduction

In this page you can find the example usage for javafx.scene.image ImageView setRotate.

Prototype

public final void setRotate(double value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);//from www .j a  v a 2  s.c  om
    stage.setHeight(500);
    Scene scene = new Scene(new Group());
    VBox root = new VBox();

    final ImageView selectedImage = new ImageView();
    Image image1 = new Image(Main.class.getResourceAsStream("a.jpg"));
    selectedImage.setImage(image1);

    selectedImage.setRotate(90);

    root.getChildren().addAll(selectedImage);

    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}