Row

@Composable
inline fun Row(modifier: SwingModifier = SwingModifier, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, verticalAlignment: Alignment.Vertical = Alignment.Top, crossinline content: @Composable RowScope.() -> Unit)

A composable that arranges its content horizontally, along the panel's reading order.

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 width the row has left over is placed by horizontalArrangement - before the children, after them, between them, or as a fixed gap through Arrangement.spacedBy. Across the row each child sits where verticalAlignment puts it.

A child claims a share of the leftover width with weight, or names its own vertical placement with align, through RowScope:

Row(horizontalArrangement = Arrangement.spacedBy(8), verticalAlignment = Alignment.CenterVertically) {
Label(text = "Status")
Panel(PanelLayout.Flow(), modifier = SwingModifier.weight(1f)) { Details() }
Button(text = "Close", onClick = ::close)
}

Parameters

modifier

the SwingModifier applied to the panel

horizontalArrangement

where the children, and the width left over, go along the row; the default Arrangement.Start packs them against the leading edge and leaves the rest of the width after them

verticalAlignment

where each child sits across the row; the default Alignment.Top puts each at the top of the height available to it

content

the composable content of the row; see RowScope