8014924: JToolTip#setTipText() sometimes (very often) not repaints component.
authoralexsch
Thu, 23 May 2013 15:52:37 +0400
changeset 17681 3c9334642f36
parent 17680 df4bdbe7fb2b
child 17682 72c03a9bfe0c
8014924: JToolTip#setTipText() sometimes (very often) not repaints component. Reviewed-by: serb
jdk/src/share/classes/javax/swing/JToolTip.java
--- a/jdk/src/share/classes/javax/swing/JToolTip.java	Wed May 22 17:37:05 2013 -0700
+++ b/jdk/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();
+        }
     }
 
     /**