Column

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

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

Every child keeps the height it prefers, and 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 keeps the width it prefers and 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")
FlowPanel(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