Package-level declarations
Types
The receiver of the content of a Panel under PanelLayout.Border, through which a child declares which region of that panel it occupies.
The receiver of the content of a Panel under PanelLayout.Card, through which a child names the card it is placed on.
The receiver of the content of a Panel under PanelLayout.GridBag, through which a child declares the cell it occupies.
The layout of a container the composition lays out: the Swing layout manager the container holds, the parameters that manager takes, and the scope S through which the container's children declare their placement under it.
The receiver of the content of a container a PanelLayout lays out. Each PanelLayout names the scope it hands its children, through which they declare their own placement under that layout; a layout that places children by declaration order alone hands this one, which offers nothing.
The receiver of a ScrollPane's content, through which a child declares the part of the pane it configures or the region it fills.
The receiver of a ScrollState.scroll block, through which the block moves the pane.
A hoistable state holder for the scroll position of a ScrollPane.
The receiver of a SplitPane's content, through which a child declares which of the two sides it occupies.
The receiver of a TabbedPane's content, through which a child declares the tab it is the page of.
Functions
Empty space that asks for nothing and grows without bound - the glue of Box.createGlue, Box.createHorizontalGlue and Box.createVerticalGlue. A PanelLayout.Box panel or a ToolBar shares the extent it has left over among its children in proportion to the room each has between its preferred and its maximum size; glue prefers nothing and has no ceiling, so its share is the largest. That share is the whole of the leftover extent where every sibling's maximum size is the size it prefers, and a part of it alongside any sibling with room to grow - room a component has until a maximum size is set on it:
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.
Creates and remembers a ScrollState starting at x, y.
A scrolling view onto content larger than the room it has - a JScrollPane, with the viewport it scrolls, its scroll bars, and the headers and corners that stay put beside them declared as content.
A SplitPane driven by a raw PropertyChangeListener instead of an onDividerLocationChange lambda. The listener is attached for the dividerLocation property as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn. Attached as-is, it hears every dividerLocation change the pane publishes, including the pane's own writes and, for a negative (default) dividerLocation, the position that request resolves to once realized on screen - old=-1 new=<resolved> - indistinguishable from a user's move.
Two sides of one area, split by a divider the user drags to give one side room at the other's expense
Empty space that holds size along orientation and reaches for as much as it is offered across it - the strut of Box.createHorizontalStrut and Box.createVerticalStrut. A horizontal strut holds a width and takes whatever height it is given, a vertical one holds a height and takes whatever width.
A TabbedPane driven by a raw ChangeListener instead of an onSelectedIndexChange lambda. The listener is notified of the tab the user selects, and of the tab the pane is left on where selectedIndex names no tab of the strip, reading the new selection off the event's source pane; the latest declared instance is the one notified, so the listener may be declared inline.
A stack of pages of which one shows at a time, picked from a strip of tabs - a JTabbedPane. The pane holds which tab is selected and reports the tab the user clicks.
A strip of items - buttons, toggles, separators - the user reaches without opening a menu, held by a JToolBar. The bar holds whether it stands docked or in a window of its own, and reports the drags that move it between the two.
The divider that groups a ToolBar's items - JToolBar.Separator. It takes its orientation from the bar holding it, so it lies across the bar's own axis and turns with it. To divide anything else, use org.jetbrains.compose.swing.components.Separator.