!7 module SeparateDesktopPaneSpike > DynSingleFunctionWithPrintLog { transient JDesktopPane desktopPane; void doIt { if (desktopPane != null) ret; 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()); desktop.add(myFrame); } } void cleanMeUp { if (desktopPane != null) { final JInternalFrame myFrame = cast dm_frame(); removeFromParent(myFrame); dm_desktopPane().add(myFrame); fixInternalFrame(myFrame); disposeFrame(desktopPane); desktopPane = null; } } }