fetch

inline fun <T : Window> fetch(): T

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>()

Throws

if no single window matches, or if the matched window is not a T.