美文网首页
Lesson17 FlowPane流失布局类

Lesson17 FlowPane流失布局类

作者: 大丰87 | 来源:发表于2019-05-12 01:34 被阅读0次

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

特性

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);//设置默认的布局方向为垂直

相关文章

网友评论

      本文标题:Lesson17 FlowPane流失布局类

      本文链接:https://www.haomeiwen.com/subject/rtjqaqtx.html