-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
8
-
jdk 1.8.0 - b62
To reproduce right-click on the scroll bar between the knob and any arrow.
See that the knob moves.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class BugScrollPaneRightClick extends Application {
@Override
public void start(Stage stage) {
VBox content = new VBox(15d);
for (int i = 0; i < 10; i++) {
content.getChildren().add(new Label("label #" + i));
}
ScrollPane scrollPane = new ScrollPane();
scrollPane.setMaxHeight(150d);
scrollPane.setPrefHeight(100d);
scrollPane.setContent(content);
HBox root = new HBox(20d);
root.getChildren().add(scrollPane);
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
See that the knob moves.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class BugScrollPaneRightClick extends Application {
@Override
public void start(Stage stage) {
VBox content = new VBox(15d);
for (int i = 0; i < 10; i++) {
content.getChildren().add(new Label("label #" + i));
}
ScrollPane scrollPane = new ScrollPane();
scrollPane.setMaxHeight(150d);
scrollPane.setPrefHeight(100d);
scrollPane.setContent(content);
HBox root = new HBox(20d);
root.getChildren().add(scrollPane);
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- relates to
-
JDK-8118271 [ScrollPane] Right-click on the scroll bar moves the knob and opens a context menu.
-
- Closed
-