Window
A top-level application window, realized as a JFrame: it shows content, holds its geometry and extended state in state, and reports the user's attempt to close it to onCloseRequest.
The close gesture is controlled: it invokes onCloseRequest and closes nothing, so the window stays on screen until the caller answers - by declaring visible false, or by stopping declaring the window at all, which is what releases its peer.
The window content runs as part of the enclosing application composition, and keeps recomposing while the window is shown.
content receives the window as its WindowScope: what the window carries besides its content - its MenuBar - is declared on that scope.
The title, visible, resizable, alwaysOnTop, iconImage and minimumSize arguments are reactive: changing any of them in a recomposition updates the realized window accordingly. Geometry and the extended state are driven by state, which is two-way: assigning to WindowState.position/WindowState.size/WindowState.extendedState repositions, resizes, maximizes, minimizes or restores the window, and a user driving the same change through the window system writes the new value back into state.
undecorated is reactive too, at a higher price: AWT only accepts decorations on a window that is not yet realized, so changing it releases the window peer and builds a replacement. The content is re-hosted in the new peer - its composition, and any state remembered in it, starts over - while the geometry and extended state held in state are re-applied to the replacement. A look and feel that draws the window decorations itself (see JFrame.setDefaultLookAndFeelDecorated) draws them on the replacement too, whatever this argument declares.
Parameters
callback to be called when the user attempts to close the window
the hoistable, observable geometry (position and size) and extended state of the window; by default one this window keeps to itself, which leaves the placement to the platform, sizes the window to its content, and starts it neither maximized nor minimized
the title of the window, empty by default, matching a freshly constructed JFrame
whether the window should be visible; true by default, so declaring a window shows it, and false hides the window while keeping its content composed
whether the window can be resized; true by default, matching a freshly constructed JFrame
whether the window stays above other windows; ignored on platforms that do not support an always-on-top window, and false by default, so the window takes its turn in the platform's stacking order
the image shown as the window's icon, or null for the platform default; the windowing system may show it in several places at sizes of its own, or show none at all
the smallest size the window can take, or null to leave the floor to the window's layout; a declared size below the floor is raised to it, while holding the user's own resizing to the floor is platform-dependent
whether the window is shown without its platform decorations (title bar and border); false by default, so the window is shown with them
the composable content of the window, receiving the window as its WindowScope