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