static void hideWindow(final Component c) { Window w = getWindow(c); if (w != null) swing { w.setVisible(false); } }