diff options
Diffstat (limited to 'javax/swing/RepaintManager.java')
-rw-r--r-- | javax/swing/RepaintManager.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/javax/swing/RepaintManager.java b/javax/swing/RepaintManager.java index 022122b87..385fe7925 100644 --- a/javax/swing/RepaintManager.java +++ b/javax/swing/RepaintManager.java @@ -534,7 +534,14 @@ public class RepaintManager } for (Iterator i = workInvalidComponents.iterator(); i.hasNext(); ) { - JComponent comp = (JComponent) i.next(); + Component comp = (Component) i.next(); + // Find validate root. + while (!(comp instanceof JComponent) + || !((JComponent) comp).isValidateRoot() + && comp.getParent() != null) + comp = comp.getParent(); + + // Validate the validate root. if (! (comp.isVisible() && comp.isShowing())) continue; comp.validate(); |