Viewport

@Composable
abstract fun Viewport(modifier: SwingModifier = SwingModifier, unitIncrement: Int? = null, blockIncrement: Int? = null, content: @Composable () -> Unit)

Configures the pane's own viewport, and shows content as the view it scrolls.

A viewport shows one view, so content composes one child and a second one is refused; several components go in a container of their own, such as a Column.

The two increments are set on both of the pane's scroll bars. Each null - the default - leaves the bars asking the content, as a JScrollPane does: a Scrollable widget answers with its own rows or lines (a table, a list, a tree, a text area), and anything else scrolls by 1 per unit and a full viewport per page.

Parameters

modifier

the SwingModifier applied to the pane's JViewport

unitIncrement

how far one arrow-button click, one keyboard line or one wheel unit scrolls; null leaves it to the content

blockIncrement

how far one page - a click in the scroll bar's track, Page Up/Page Down - scrolls; null leaves it to the content

content

the view the viewport scrolls

See also