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