Border
Places each child in the region that child names: the four edges and the center. An edge child keeps the thickness it prefers and spans its edge, and the center child takes whatever the edges leave.
A child names its region on its own modifier, through BorderPanelScope:
Panel(PanelLayout.Border()) {
Toolbar(modifier = SwingModifier.north())
Editor()
StatusBar(modifier = SwingModifier.south())
}Content copied to clipboard
A child that names no region occupies the center, so the panel's main content is written plainly.
A region hosts one child: dropping a child (e.g. behind an if) empties the region it occupied, and an edge no child names holds nothing.
See also
Functions
Link copied to clipboard
Lays the container out under this layout. An implementation makes one write on updater through installManager.