On Fri, 13 Aug 2021 12:15:38 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> UIManager.getColor(). should suffice

Fixed.

> But I am not sure with this hardcoded values..Can't we leverage viewRect or 
> textRect to get the required coordinates?

viewRect is set to be exactly (0, 0, b.width, b.height). Insets are buried deep 
inside JRS classes and used as hardcoded valued, i can not  get them from there 
and both textRect and iconRect are not representing what needs to be drawn to 
be consistent with the way OS draws focus. Plus they are being initialized only 
later down the code and at the time of this call they are empty. Not that it 
would matter.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5082

Reply via email to