!7 static Canvas canvas; static CirclesAndLines cal; p-subst { Pair p = showWeb(randomWeb(), 800, 600); cal = p.a; canvas = p.b; doFrameTitle(); addButtonsToWindow2(canvas, "Comment", f comment, "Next", r { CirclesAndLines newCAL = webToCAL(randomWeb()); canvas = showCAL_2(cal, newCAL, canvas); doFrameTitle(); }); focusButton(canvas, "Next"); } svoid doFrameTitle { frameTitle(canvas, joinNempties(" - ", cal.globalID, quoteIfNempty(cal.title))); } svoid comment { JFrame f = getFrame(canvas); Container cp = getContentPane(canvas); removeFromParent(cp); print("n=" + numberOfChildren(cp)); JPanel newPane = jpanelWithoutLayoutManager(); newPane.add(cp); cp.setBounds(100, 100, 200, 200); setFrameContents(f, newPane); }