ScrollPaneScope
The receiver of a ScrollPane's content, through which a child declares the region of the pane it is installed in.
Children are written plainly; the region a child declares here rides along on its modifier:
ScrollPane {
Column(modifier = SwingModifier.viewport()) { Rows() }
Label(text = "Rows", modifier = SwingModifier.rowHeader())
Label(text = "*", modifier = SwingModifier.corner(JScrollPane.UPPER_TRAILING_CORNER))
}The regions are the viewport, the row header, the column header and each of the four corners. A pane holds nothing besides them, so every child names one and a child that names none is refused, naming the pane and the builders that would place it. Each region becomes the single view of the corresponding JViewport or the single child of a corner host, so it shows one component and two children naming the same region are refused too; the four corners are four regions, so two children in different corners are two children in their own regions. A child that goes away releases the region it held.
See also
Functions
Installs the child as the column header, shown in a viewport pinned to the top edge and scrolled horizontally in sync with the content.
Installs the child in the corner slot, the square where two of the pane's edges meet.
Installs the child as the row header, shown in a viewport pinned to the leading edge and scrolled vertically in sync with the content.
Installs the child as the scrollable content, shown in the pane's central viewport.