Like separators, borders are used to visually partition application content. Like Separator, the Border class provides an optional title property that can be used to assign a heading to the border. However, unlike separators, borders are containers. A border accepts a single content component that it sizes to fit its available client area.

The example below shows two Border components, each of which contains a label. The border on the left has a title and showcases the default border style. The border on the left has no title and applies some custom style values:

The BXML for this example is shown below:

            <Window title="Borders" maximized="true"
                <TablePane styles="{horizontalSpacing:10}">
                        <TablePane.Column width="1*"/>
                        <TablePane.Column width="1*"/>

                    <TablePane.Row height="1*">
                        <Border title="Border 1" styles="{padding:2}">
                            <Label text="Default border with title"
                                styles="{horizontalAlignment:'center', verticalAlignment:'center', wrapText:true}"/>
                        <Border styles="{color:'#ff0000', titleColor:'#000000', thickness:10,
                            cornerRadii:20, padding:2}">
                            <Label text="Custom border with 10-pixel thick red border, rounded corners, and no title"
                                styles="{horizontalAlignment:'center', verticalAlignment:'center', wrapText:true}"/>

Since this example contains no logic, there is no associated Java source.

Next: Stack Panes