8014924: JToolTip#setTipText() sometimes (very often) not repaints component

Reviewed-by: serb
This commit is contained in:
Alexander Scherbatiy 2013-05-23 15:52:37 +04:00
parent 9a0b18efc0
commit 1942e52e48

View File

@ -31,6 +31,7 @@ import javax.accessibility.*;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.util.Objects;
/**
@ -128,6 +129,11 @@ public class JToolTip extends JComponent implements Accessible {
String oldValue = this.tipText;
this.tipText = tipText;
firePropertyChange("tiptext", oldValue, tipText);
if (!Objects.equals(oldValue, tipText)) {
revalidate();
repaint();
}
}
/**