Resolves the matched window and returns it typed as T, for driving the window's own API directly (e.g. a JFrame's extended state, a JDialog's modality):
val frame = onWindow().fetch<JFrame>()
if no single window matches, or if the matched window is not a T.