Column

@Composable
inline fun Column(modifier: SwingModifier = SwingModifier, verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, crossinline content: @Composable ColumnScope.() -> Unit)

A composable that arranges its content vertically, top to bottom.

An explicit maximumSize caps the offer and normally the extent each child takes on either axis. A layout modifier whose own contract permits escape from an impossible offer, such as aspectRatio, may report an extent outside that maximum. The height the column has left over is placed by verticalArrangement - above the children, below them, between them, or as a fixed gap through Arrangement.spacedBy. Across the column each child sits where horizontalAlignment puts it.

A child claims a share of the leftover height with weight, or names its own horizontal placement with align, through ColumnScope:

Column(verticalArrangement = Arrangement.spacedBy(8), horizontalAlignment = Alignment.CenterHorizontally) {
Label(text = "Title")
Panel(PanelLayout.Flow(), modifier = SwingModifier.weight(1f)) { Body() }
Button(text = "Close", onClick = ::close)
}

Parameters

modifier

the SwingModifier applied to the panel

verticalArrangement

where the children, and the height left over, go along the column; the default Arrangement.Top packs them against the top and leaves the rest of the height below them

horizontalAlignment

where each child sits across the column; the default Alignment.Start puts each at the leading edge - the left under a left-to-right orientation

content

the composable content of the column; see ColumnScope