package graphics.api.control.scrollview; import javafx.beans.property.*; import javafx.application.Application; import javafx.stage.*; import javafx.scene.*; import javafx.scene.control.*; import javafx.beans.property.BooleanProperty; import javafx.beans.binding.Bindings; import javafx.collections.FXCollections; import javafx.event.ActionEvent; import javafx.event.EventHandler; public class ScrollViewPannableIssue extends Application { public static void main(String[] args) { ScrollViewPannableIssue.launch(args); } @Override public void start(Stage stage) throws Exception { double h = 400; double w = 400; int width = 40; int height = 40; ScrollPane scrollView1 = new ScrollPane(); scrollView1.setHbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS); scrollView1.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS); Button button2 = new Button("ScrollView1"); button2.setMinWidth(width); button2.setMinHeight(height); scrollView1.setContent(button2); scrollView1.setTranslateX(70); scrollView1.setTranslateY(30); scrollView1.setPrefWidth(100); scrollView1.setPrefHeight(100); scrollView1.setPannable(true); Scene scene = new Scene(new Group(), w, h); ((Group) scene.getRoot()).getChildren().clear(); ((Group) scene.getRoot()).getChildren().add(scrollView1); stage.setScene(scene); stage.show(); scrollView1.requestFocus(); } }