Lesson17 FlowPane流失布局类

2019-05-12  本文已影响0人  大丰87

特点:随着缩放窗口,窗口上的组件会上下移动(缩小向下,放大向上),在有限的空间内布局组件,如下图:

特性

FlowPane的常用方法
    flow.setStyle("-fx-background-color: #548B54");//设置flow的背景颜色
    flow.setPadding(new Insets(10));//设置(flow的)内边距
    flow.setMargin(b1,new Insets(10));//设置某个组件的外边距
    flow.setAlignment(Pos.CENTER);//设置对齐方式
    flow.setHgap(10);//设置子组件的水平间距
    flow.setVgap(10);//设置子组件的垂直间距
    flow.setOrientation(Orientation.VERTICAL);//设置默认的布局方向为垂直
上一篇 下一篇

猜你喜欢

热点阅读