我有打击代码它不起作用我不明白这是怎么回事?
FlowPane flowPane = new FlowPane();
System.out.println("log:brows song");
for (int i = 0; i < 10; i++) {
Image image = new Image(new File("sample/image/2.jpg").toURI().toString());
ImageView imageView = new ImageView(image);
flowPane.getChildren().add(imageView);
}
mainAnchorePaneArtist.getChildren().clear();
mainAnchorePaneArtist.getChildren().add(flowPane);
它清除了 mainAnchorePaneArtist 中的所有节点,但它不添加流窗格或可能不显示它!