On Thu, 16 Oct 2025 09:25:34 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> Test fails in GTKLookAndFeel with NPE
> 
> java.lang.NullPointerException
> at javax.swing.border.BevelBorder.<init>(BevelBorder.java:78)
> at javax.swing.BorderFactory.createBevelBorder(BorderFactory.java:155)
> at 
> com.sun.java.swing.plaf.motif.MotifInternalFrameTitlePane$Title.<init>(MotifInternalFrameTitlePane.java:325)
>  
> 
> because `BorderFactory.createBevelBorder` tries to use brighter shade of 
> highlight and shadow color which it tries to obtain from 
> `UIManager.getColor("activeCaptionBorder")` and 
> `UIManager.getColor("inactiveCaptionBorder")` both of which are not defined 
> in GTK L&F as caption border are not used there
> 
> Fix is made to not use these color to create BevelBorder if these colors are 
> not present..

I don’t have a strong opinion on whether this is a test bug: using the Motif 
L&F UI classes while GTK is active, a bug in the Motif UI class that assumes 
these variables are always set, or a bug in BorderFactory.java as addressed by 
this PR.

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

PR Comment: https://git.openjdk.org/jdk/pull/27839#issuecomment-3417915497

Reply via email to