static S makeFrame_defaultIcon; sbool makeFrame_hideConsole; static new ThreadLocal> makeFrame_post; static JFrame makeFrame() { ret makeFrame((Component) null); } static JFrame makeFrame(O content) { ret makeFrame(programTitle(), content); } static JFrame makeFrame(S title) { ret makeFrame(title, null); } static JFrame makeFrame(S title, O content) { ret makeFrame(title, content, true); } static JFrame makeFrame(fS title, fO content, final bool showIt) { final VF1 post = optParam(makeFrame_post); ret swing(func -> JFrame { if (getFrame(content) != null) ret getFrame(setFrameTitle((Component) content, title)); final JFrame frame = new JFrame(title); if (makeFrame_defaultIcon != null) setFrameIconLater(frame, makeFrame_defaultIcon); _initFrame(frame); Component wrapped = wrap(content); if (wrapped != null) frame.getContentPane().add(wrapped); ifdef restrictAllWindowsToScreenSize restrictWindowToScreenSize(frame); endifdef frame.setBounds(defaultNewFrameBounds()); callF(post, frame); if (showIt) frame.setVisible(true); //callOpt(content, "requestFocus"); //exitOnFrameClose(frame); if (showIt && makeFrame_hideConsole) { hideConsole(); makeFrame_hideConsole = false; } ret frame; }); }