static void activateFrame(JFrame f) { if (f.getState() == Frame.ICONIFIED) f.setState(Frame.NORMAL); f.toFront(); }