void (Object parent, Object component, int index) { String parentclass = getClass(parent); String classname = getClass(component); //System.out.println("add " + classname + " -> " + parentclass); if ((("combobox" == parentclass) && ("choice" == classname)) || (("tabbedpane" == parentclass) && ("tab" == classname)) || (("list" == parentclass) && ("item" == classname)) || (("table" == parentclass) && (("column" == classname) || ("row" == classname))) || (("row" == parentclass) && ("cell" == classname)) || ((("tree" == parentclass) || ("node" == parentclass)) && ("node" == classname)) || (("menubar" == parentclass) && ("menu" == classname))) { classname = classname; // compiler bug } else if (("menu" == parentclass) && (("menu" == classname) || ("menuitem" == classname) || ("checkboxmenuitem" == classname) || ("separator" == classname))) { classname = "menu"; } else if (("panel" == parentclass) || ("desktop" == parentclass) || ("splitpane" == parentclass) || ("dialog" == parentclass) || ("tabbedpane" == parentclass)) { while ("component" != classname) { String extendclass = null; for (int i = 0; i < dtd.length; i += 3) { if (classname == dtd[i]) { extendclass = (String) dtd[i + 1]; break; } } if (extendclass == null) throw new IllegalArgumentException(classname + " not component"); classname = extendclass; } } else throw new IllegalArgumentException(classname + " add " + parentclass); insertItem(parent, (String) classname, component, index); set(component, ":parent", parent); //if (parent == content) System.out.println(getClass(parent) + ".add(" + getClass(component) + ") : " + classname); }