static new ThreadLocal addInternalFrame_dontSelect; static JInternalFrame addInternalFrame(final JDesktopPane desktop, fS title, final int x, final int y, final int w, final int h) { ret addInternalFrame(desktop, title, x, y, w, h, null); } static JInternalFrame addInternalFrame(final JDesktopPane desktop, fS title, final int x, final int y, final int w, final int h, final Component contents) { ret swing(func -> JInternalFrame { JInternalFrame frame = jInternalFrame(title); if (contents != null) setInternalFrameContents(frame, contents); desktop.add(setBounds(x, y, w, h, frame)); frame.setSelected(true); ret fixInternalFrame(frame); }); } static JInternalFrame addInternalFrame(final JDesktopPane desktop, fS title, final Component contents) { ret swing(func -> JInternalFrame { JInternalFrame frame = jInternalFrame(title); setInternalFrameContents(frame, contents); desktop.add(frame); internalFrameDefaultPosition(frame); if (!isTrue(addInternalFrame_dontSelect!)) frame.setSelected(true); ret fixInternalFrame(frame); }); } static JInternalFrame addInternalFrame(JDesktopPane desktop, S title) { ret addInternalFrame(desktop, title, jpanel()); }