public static Component copyComponent(Component comp) { try { return comp.copy(); } catch (Exception e) { throw new CosmoException("error copying component: " + comp, e); } }