public void parseAttributes(Element elm, JComponent comp) { String enabled = elm.getAttribute("enabled"); if (enabled != null) { comp.setEnabled(!enabled.equals("false")); } String id = elm.getAttribute("id"); if (id.length() > 0) { components.put(id, comp); comp.setName(id); } String tooltip = elm.getAttribute("tooltip"); if (tooltip.length() > 0) { comp.setToolTipText(tooltip); } }