On Tue, 21 Apr 2026 19:39:46 GMT, Phil Race <[email protected]> wrote:
> > I see an NPE when I focus a disabled text field with the > > javax.swing.plaf.nimbus.NimbusLookAndFeel LaF enabled. > > hmm. That's clearly a problem. And surprising. The existing code doesn't have > any obvious protection against null. OTOH, it doesn't "use" it - just passes it to setColor() - which just ignores null (!) I guess this means that the current graphics color is the fall back .. so if there's no caret color you need to use the current graphics color instead. Then it is for another day as to whether that should really be null. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30758#issuecomment-4291304315
