8014924: JToolTip#setTipText() sometimes (very often) not repaints component
Reviewed-by: serb
This commit is contained in:
parent
9a0b18efc0
commit
1942e52e48
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user