!7 module SeparateDesktopPaneSpike > DynSingleFunctionWithPrintLog { transient JDesktopPane desktopPane; void doIt { if (desktopPane != null) ret with moveBack(); final JInternalFrame myFrame = cast dm_frame(); if (myFrame == null) ret; desktopPane = jDesktopPane(); autoFixDesktopPane(desktopPane); showFrame("Separate Frame", desktopPane); swing { removeFromParent(myFrame); myFrame.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight()); desktopPane.add(myFrame); } } void moveBack { if (desktopPane == null) ret; final JInternalFrame myFrame = cast dm_frame(); removeFromParent(myFrame); dm_desktopPane().add(myFrame); fixInternalFrame(myFrame); disposeFrame(desktopPane); desktopPane = null; } void cleanMeUp { disposeFrame(desktopPane); desktopPane = null; } }