BoxPanel

@Composable
fun BoxPanel(modifier: SwingModifier = SwingModifier, axis: Int = BoxLayout.Y_AXIS, content: @Composable () -> Unit = {})

A JPanel under a BoxLayout: the children are laid out one after another along a single axis, in declaration order.

A BoxLayout puts no space between children on its own. Declare gaps as content: RigidArea and Strut for a fixed gap, Glue for empty space that takes the largest share of what is left over.

Parameters

modifier

the SwingModifier applied to the panel

axis

the axis along which children are arranged (a BoxAxis BoxLayout value); the default Y_AXIS stacks them top to bottom

content

the composable content of the panel; empty by default

See also