<Swing Dev> [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Apr 20 16:46:45 UTC 2020


On 4/20/20 8:34 am, Prasanta Sadhukhan wrote:
> 
> On 20-Apr-20 8:54 PM, Sergey Bylokhov wrote:
>> On 4/20/20 2:40 am, Prasanta Sadhukhan wrote:
>>> http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.4/
>>>
>>> used the right GC for the tip but we still need the preferredSize in the paint()
>>
>> Why do we need it? Do we calculate the size in the ToolTipManager.showTipWindow() incorrectly?
>> We call tip.getPreferredSize() there,  does it return different result than in the paint() method?
>>
> No, there it returns the same value as paint() now after GC fix, but c.getSize() in paint() returns the JPanel size which is not same as preferredSize and it is not enough to contain the text, it seems.

But the panel and window both are created by our code in ToolTipManager.showTipWindow, should we adjust it?

-- 
Best regards, Sergey.


More information about the swing-dev mailing list