Recently i got paint() calls with empty clip-regions, i think i found the reason. Whenever something will be removed from the current clip region it sets nothingChanged to false.
But clipObscuredRegions() calls also itself to remove regions from its probably opaque children.
Than clipObscuredRegions returns false, which causes nothingChanged still to stay true, adding a "!" before clipObscuredRegions solves the problem.
static bool clipObscuredRegions (const Component& comp, Graphics& g, const Rectangle clipRect, Point delta) { bool nothingChanged = true; for (int i = comp.childComponentList.size(); --i >= 0;) { const Component& child = *comp.childComponentList.getUnchecked(i); if (child.isVisible() && ! child.isTransformed()) { const Rectangle newClip (clipRect.getIntersection (child.bounds)); if (! newClip.isEmpty()) { if (child.isOpaque() && child.componentTransparency == 0) { g.excludeClipRegion (newClip + delta); nothingChanged = false; } else { const Point childPos (child.getPosition()); // if (!clipObscuredRegions (child, g, newClip - childPos, childPos + delta)) nothingChanged = false; // insert "!" before clipObscuredReqions } } } } return nothingChanged; }