List of usage examples for javafx.scene.control ScrollPane setPannable
public final void setPannable(boolean value)
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);/* w ww . j a v a 2 s. c o m*/ Rectangle rect = new Rectangle(200, 200, Color.RED); ScrollPane s1 = new ScrollPane(); s1.setPannable(true); s1.setPrefSize(120, 120); s1.setContent(rect); root.getChildren().add(s1); stage.show(); }