void (Object component, Object mode) { if ("parent" == mode) { component = getParent(component); mode = "validate"; } boolean firstpaint = true; int x = 0; int y = 0; int width = 0; int height = 0; while (component != null) { if (!getBoolean(component, "visible", true)) { break; } if ("paint" == mode) {//|| (firstpaint && (component == content)) Rectangle bounds = getRectangle(component, "bounds"); if (bounds == null) { return; } if (firstpaint) { x = bounds.x; y = bounds.y; width = Math.abs(bounds.width); height = bounds.height; firstpaint = false; } else { x += bounds.x; y += bounds.y; } if (component == content) { repaint(x, y, width, height); } } Object parent = getParent(component); String classname = getClass(parent); if ("combobox" == classname) { parent = get(parent, "combolist"); } else if ("menu" == classname) { parent = get(parent, "popupmenu"); } else if (("paint" == mode) && ("tabbedpane" == classname)) { if (getItemImpl(parent, "component", getInteger(parent, "selected", 0)) != component) { break; } } if (("layout" == mode) || (("validate" == mode) && (("list" == classname) || ("table" == classname) || ("tree" == classname) || ("dialog" == classname) || (parent == content)))) { Rectangle bounds = getRectangle(parent, "bounds"); if (bounds == null) { return; } bounds.width = -1 * Math.abs(bounds.width); mode = "paint"; } component = parent; } }