// c = Component or something implementing swing() static JComponent wrap(O swingable) { ret _recordNewSwingComponent(wrap_2(swingable)); } static JComponent wrap_2(O swingable) { if (swingable == null) null; JComponent c; if (swingable cast Component) c = componentToJComponent(swingable); ifclass Swingable else if (swingable instanceof Swingable) c = componentToJComponent(swingable/Swingable.visualize()); endif else c = componentToJComponent((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; }