Hi, Prasanta.
On 01.07.2019 03:25, Prasanta Sadhukhan wrote:
Currently this rectangle is created based on the size of the component, so this 
rectangle is smaller that the size.
But it looks like after the fix the rectangle will be bigger. Probably the bug 
exists in getPreferredSize() where we return small size?

I have modified the fix to scale the size in getPreferredSize() as asked.
http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.1/

If I am not missing something then BasicToolTipUI.getPreferredSize() is based 
on View.getPreferredSpan(). And it looks like the View actually responsible to 
draw the actual text. I guess the View should know what is the correct 
preferred size of the text. If the size of the View is outdated then probably 
we need to reset it?

For example take a look to the BasicButtonUI class it uses the similar logic on 
top of View, but we reset the view if font, or font transform is changed see 
JDK-8201552 and BasicButtonListener.propertyChange()

--
Best regards, Sergey.

Reply via email to