當嘗試使用下面的代碼,一個異常java.lang.UnsupportedOperationException發生:的getChildren方法是從類ScrollPane中失蹤的JavaFX
ScrollPane scrollPaneIdFx = new ScrollPane();
ImageView imageViewIdFx = new ImageView();
scrollPaneIdFx.getChildrenUnmodifiable().add(imageViewIdFx);
,如果嘗試使用下面的代碼,然後的getChildren是不可見的,由於保護說明
ScrollPane scrollPaneIdFx = new ScrollPane();
ImageView imageViewIdFx = new ImageView();
scrollPaneIdFx.getChildren().add(imageViewIdFx);
有人可以建議,如何添加到ScrollPane兒童?