changeset 7186:6261e94e9869

8014924: JToolTip#setTipText() sometimes (very often) not repaints component. Reviewed-by: serb
author alexsch
date Thu, 23 May 2013 15:52:37 +0400
parents 73d3bed5f8c8
children e8cacde33d27
files src/share/classes/javax/swing/JToolTip.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/JToolTip.java	Wed May 22 17:37:05 2013 -0700
+++ b/src/share/classes/javax/swing/JToolTip.java	Thu May 23 15:52:37 2013 +0400
@@ -31,6 +31,7 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
 import java.io.IOException;
+import java.util.Objects;
 
 
 /**
@@ -128,6 +129,11 @@
         String oldValue = this.tipText;
         this.tipText = tipText;
         firePropertyChange("tiptext", oldValue, tipText);
+
+        if (!Objects.equals(oldValue, tipText)) {
+            revalidate();
+            repaint();
+        }
     }
 
     /**