JavaFX 8.0有此错误,我不知道如何解决。
示例:http://i.imgur.com/tavh6XA.png
如果拖动ScrollPane,其内容将变得模糊,但是如果将其拖动回,则内容将恢复其清晰度。如果我不修改坐标,则内容看起来会很好。
有人解决了这个问题吗?
示例代码:
@Override
public void start(Stage stage) {
Pane pane = new Pane();
Scene scene = new Scene(pane, 500, 500);
pane.prefWidthProperty().bind(scene.widthProperty());
pane.prefHeightProperty().bind(scene.heightProperty());
ScrollPane scroll = new ScrollPane();
// Center ScrollPane
scroll.layoutXProperty().bind(pane.widthProperty().divide(2).subtract(scroll.widthProperty().divide(2)));
scroll.layoutYProperty().bind(pane.heightProperty().divide(2).subtract(scroll.heightProperty().divide(2)));
scroll.setPrefSize(200, 200);
ListView<String> list = new ListView<>();
scroll.setContent(list);
list.getItems().addAll("Resize the window", "and see how this list", "becomes blurry");
// Label indicates x, y coords of ScrolPane and their ratio.
TextField size = new TextField();
size.setPrefWidth(500);
size.textProperty().bind(
scroll.layoutXProperty()
.asString("x: %s; ").concat(
scroll.layoutYProperty() …Run Code Online (Sandbox Code Playgroud)