diff options
author | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2006-04-30 09:24:19 +0000 |
---|---|---|
committer | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2006-04-30 09:24:19 +0000 |
commit | 8ba0af0392375c456d89246f8030ba401490c9b0 (patch) | |
tree | fc216e038aa79d9a43326a253bc1faebf7a56e85 | |
parent | 28561079189d88965440c8ad82403b9d682f4a7e (diff) | |
download | classpath-8ba0af0392375c456d89246f8030ba401490c9b0.tar.gz |
2006-04-30 Audrius Meskauskas <AudriusA@Bioinformatics.org>
PR 27297
* javax/swing/JComponent.java (paintChildrenWithOverlap):
Use for and not while to prevent the endless loop.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | javax/swing/JComponent.java | 6 |
2 files changed, 8 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2006-04-30 Audrius Meskauskas <AudriusA@Bioinformatics.org> + + PR 27297 + * javax/swing/JComponent.java (paintChildrenWithOverlap): + Use for and not while to prevent the endless loop. + 2006-04-29 David Gilbert <david.gilbert@object-refinery.com> * javax/swing/JList.java diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java index 21904b566..a84122ab7 100644 --- a/javax/swing/JComponent.java +++ b/javax/swing/JComponent.java @@ -1862,8 +1862,8 @@ public abstract class JComponent extends Container implements Serializable // Go through children from top to bottom and find out their paint // rectangles. - int index = 0; - while (paintRectangles.size() > 0 && index < children.length) + for (int index = 0; paintRectangles.size() > 0 && + index < children.length; index++) { Component comp = children[index]; if (! comp.isVisible()) @@ -1964,8 +1964,6 @@ public abstract class JComponent extends Container implements Serializable paintRegions.add(componentRectangles); componentRectangles = new ArrayList(); } - - index++; } // paintingTile becomes true just before we start painting the component's |