static void disposeWindowAfter_unlessMouseInIt(final double seconds, final Component c) { thread "Dispose window" { sleepSeconds(seconds); while (mouseInWindow(c)) // TODO: check if other windows are on top sleepSeconds(1); disposeWindow(c) } }