changeset 6104:cb92124a3507

8014924: JToolTip#setTipText() sometimes (very often) not repaints component. Reviewed-by: serb
author alexsch
date Fri, 24 May 2013 15:01:50 +0400
parents 34cf6b72042e
children 05e7d9925f3e
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	Thu May 23 14:46:44 2013 +0200
+++ b/src/share/classes/javax/swing/JToolTip.java	Fri May 24 15:01:50 2013 +0400
@@ -31,6 +31,7 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
 import java.io.IOException;
+import java.util.Objects;
 
 
 /**
@@ -127,6 +128,11 @@
         String oldValue = this.tipText;
         this.tipText = tipText;
         firePropertyChange("tiptext", oldValue, tipText);
+
+        if (!Objects.equals(oldValue, tipText)) {
+            revalidate();
+            repaint();
+        }
     }
 
     /**