On 30-Apr-20 8:06 AM, Sergey Bylokhov wrote:
On 4/20/20 11:14 am, Prasanta Sadhukhan wrote:
It seems JPanel (component created for LW popup) GC is again null and not in sync with JToolTip's GC so in addition to fix JToolTip's GC, we also need to set GC of JPanel (jn sync with "contents" or tip's GC), so setSize() will be set same as preferredSize.

http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.5/

I could understand that we need to use some specific GC instead of null(which is the default), but a force to use GC instead of another non-null GC sounds not good, isn't it?

I couldn't get what you are trying to say...You have a problem with using getPreferredSize() in BasicToolTipUI#paint and you asked why can't we use the same setSize() as it is now. I found we cannot use that because JPanel.setSize() is wrong because it's GC was null when the "size" was calculated. If we fix the JPanel's GC with the default GC (the same way we fix ToolTip's GC) then we can continue to use setSize() in paint. If you do not have problem with how we fix JTooltip's GC ,then what is the problem with fixing JPanel's GC?

Reply via email to