void (Object component, int x, int y, int width, int height) { while ((component = getParent(component)) != null) { Rectangle bounds = getRectangle(component, "bounds"); x += bounds.x; y += bounds.y; } repaint(x, y, width, height); }