LayeredPaneScope
The receiver of a LayeredPane's content, through which a child declares the depth layer it sits on.
Children are written plainly, and the depth a child declares through layer rides along on its modifier. A child declaring no depth stands on JLayeredPane.DEFAULT_LAYER, so a pane whose children share one depth is written without naming it:
LayeredPane {
Background()
FloatingToolbar(modifier = SwingModifier.layer(JLayeredPane.PALETTE_LAYER))
}Content copied to clipboard
A layer holds as many children as the composition puts on it, so two children naming one depth both stand on the pane.
See also
Functions
Link copied to clipboard
Places the child on the depth layer. Higher values paint above lower ones: name a well-known JLayeredPane layer (JLayeredPane.DEFAULT_LAYER, PALETTE_LAYER, MODAL_LAYER, POPUP_LAYER, DRAG_LAYER) or any other integer depth.