slot
Installs the component into its parent through attachment - one of the host's own dedicated setters rather than the generic Container.add (e.g. a JScrollPane region reached via setViewportView). The attachment belongs to the host: a container composable wrapping such a host is what hands each of its regions the attachment that installs a component there and takes it out again.
A host that holds its children this way says so, through org.jetbrains.compose.swing.node.ChildPlacement on its own node, and every child composed under it names a region: a modifier declaring none is refused there, and a modifier declaring one is refused under a host that adds its children by index. The last region declared in a modifier chain wins, and a modifier declaring a region as well as a layoutConstraint is refused, since a parent holds a child by one of the two.
The placement follows the region named: a modifier naming another region moves the component there, released from the region it fills through the SlotAttachment that filled it and installed through the one named now, and a modifier that stops naming a region releases the one its component fills. The move lands once the change pass that declared it has settled, so a pass that swaps what two regions hold leaves each component in the region its own modifier names, whichever order the two declarations reach the host in. The attachment is how the named region is filled rather than which region that is: one carrying a declaration the host writes onto the region - a tab's title - re-declares that region's contents without moving the component out of it. A node the host moves among its siblings keeps the region it fills.
Return
this modifier with the region declared on it.
Parameters
which region of the host this fills, written exactly as the call that fills it - "SwingModifier.viewport()", "SwingModifier.corner(UPPER_LEFT)". It identifies the region among the host's own, and it is what an error about that region prints, so a caller acts on that text by typing it.
installs the component into the host and returns its uninstall action.