!7 static IVar text; static JTextField tf; static JDesktopPane desktop; p-awt { text = persistentVar("Text", "Show me a window!"); tf = jcenteredtextfield(text!); onUpdate(tf, r { text.set(getText(tf)) }); onEnter(tf, f go); desktop = jTiledBackgroundDesktopPane(#1009931); final JPanel bg = jtransparent_recursive( jfullcenter(withBottomMargin(550, jMinWidth(400, setFontSize(30, tf))))); desktop.add(bg); desktop.setLayout(layoutManagerFromFunction(voidfunc(Container c) { bg.setBounds(0, 0, c.getWidth(), c.getHeight()); })); //desktop.add(setBounds(100, 400, 300, 200, jInternalFrame("Hello!"))); cleanExitOnFrameClose(showFullScreen(desktop)); focus(tf); hideConsole(); } svoid go { callStaticAnswerMethod(getText(tf)); } answer { if "show me a window" { JInternalFrame frame; desktop.add(setBounds(random(100, desktop.getWidth()-100-300), 400, 300, 200, frame = jInternalFrame("Here it is."))); frame.moveToFront(); } }