!7 static AutoComboBox3 tf; static SingleComponentPanel scp; static ReliableSingleThread rst = new(r go); sS loaded; p-subst { autoRestart(); showFrame(northAndCenterWithMargins( fontSize(15, centerComboBox(tf = standardFunctionComboBox())), scp = singleComponentPanel())); onChange(tf, rstTrigger(rst)); } svoid go { S s = getTextTrim(tf); if (eq(loaded, s)) ret; loaded = s; JComponent c = renderSafeFunction(s, r { loaded = null; rst.trigger() }); if (c != null) scp.setComponent(c); } static JComponent renderSafeFunction(S s, final Runnable refresh) { if (!isStandardFunction(s)) null; SS safetyMap = mechHashMap("JavaX Identifier Safety"); S safety = safetyMap.get(s); print("Safety for " + s + ": " + safety); fS fname = s; if (empty(safety) || !setContainsSet(ll("safe", "awt"), tokSplitAtComma(safety))) ret jfullcenter(jbutton("Check " + s + " for safety" + (empty(safety) ? "" : ": " + safety), rThread(r { checkStandardFunctionForSafety(fname); callF(refresh) }))); O o = callAndMake(s); Component c; if (o instanceof JComponent) c = o/JComponent; else c = jCenteredMultiLineLabel(str(o)); ret withCenteredTitle(s + " [" + safety + "]", c); }