diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | javax/swing/JComponent.java | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2006-05-04 Roman Kennke <kennke@aicas.com> + * javax/swing/JComponent.java + (paint): Added null check to avoid NPE when clip == null. + +2006-05-04 Roman Kennke <kennke@aicas.com> + * javax/swing/AbstractButton.java (addImpl): New method. Installs an OverlayLayout if no other layout has been installed before. diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java index f8d82c736..d916d0583 100644 --- a/javax/swing/JComponent.java +++ b/javax/swing/JComponent.java @@ -1764,8 +1764,9 @@ public abstract class JComponent extends Container implements Serializable paintBorder(g2); paintChildren(g2); Rectangle clip = g2.getClipBounds(); - if (clip.x == 0 && clip.y == 0 && clip.width == getWidth() - && clip.height == getHeight()) + if (clip == null + || (clip.x == 0 && clip.y == 0 && clip.width == getWidth() + && clip.height == getHeight())) RepaintManager.currentManager(this).markCompletelyClean(this); } } |