Panel

@Composable
fun <S : PanelScope> Panel(layout: PanelLayout<S>, modifier: SwingModifier = SwingModifier, content: @Composable S.() -> Unit)

A JPanel under the Swing layout manager layout names, holding content as its children.

Children are written plainly; what a child declares to layout's scope places it under that manager.

A change of layout kind installs the new manager on the panel standing and builds the children anew; a change of a layout's parameters applies to the manager standing.

Parameters

layout

the layout the panel's children are laid out under; see PanelLayout

modifier

the SwingModifier applied to the panel

content

the composable content of the panel, with layout's scope as its receiver


@Composable
fun Panel(modifier: SwingModifier = SwingModifier, content: @Composable PanelScope.() -> Unit)

A JPanel under the layout a JPanel builds itself with: a PanelLayout.Flow laying content out in a centered row that wraps, 5 apart in user-space coordinates.

Parameters

modifier

the SwingModifier applied to the panel

content

the composable content of the panel