// c = Component or something implementing swing() static Component wrap(O swingable) { ret _recordNewSwingComponent(wrap_2(swingable)); } static Component wrap_2(O swingable) { if (swingable == null) null; Component c; if (swingable instanceof Component) c = (Component) swingable; ifclass Swingable else if (swingable instanceof Swingable) c = swingable/Swingable.visualize(); endif else c = (Component) callOpt(swingable, "swing"); if (c instanceof JTable || c instanceof JList || c instanceof JTextArea || c instanceof JEditorPane || c instanceof JTextPane || c instanceof JTree) ret jscroll(c); ret c == null ? jlabel(str(swingable)) : c; }