public FlowPaneSample() {
super(400, 400);
FlowPane flowPane = new FlowPane(2, 4);
flowPane.setPrefWrapLength(200); //preferred wraplength
Label[] shortLabels = new Label[ITEMS];
Label[] longLabels = new Label[ITEMS];
ImageView[] imageViews = new ImageView[ITEMS];
for (int i = 0; i < ITEMS; i++) {
shortLabels[i] = new Label("Short label.");
longLabels[i] = new Label("I am a slightly longer label.");
imageViews[i] = new ImageView(ICON_48);
flowPane.getChildren().addAll(shortLabels[i], longLabels[i], imageViews[i]);
}
getChildren().add(flowPane);
}
FlowPaneSample.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:marathonv5
作者:
评论列表
文章目录