<Swing Dev> [12] RFR JDK-8192888: AllSwingComponentsBaselineTest fails with NullPointerException for NimbusLookAndFeel
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Sep 12 19:48:21 UTC 2018
On 11/09/2018 22:03, Prasanta Sadhukhan wrote:
>> Why SynthLookAndFeel.updateStyle() which is called in
>> SynthButtonUI.updateStyle(AbstractButton b) did not update the context
>> which is passed to it? Is it possible that
>> SynthButtonUI.installDefaults() was not called before getBaseline()?
>>
> SynthButtonUI.updateStyle() called from SynthButtonUI.installDefaults()
> creates a new context whereas in getBaseline() we again calls
> getContext() in l207 which creates a new SynthContext, so the style was
> not updated to the context currently being queried in getBaseline()
SynthButtonUI.updateStyle() creates a new context and at the same time
updates the "SynthStyle.style", so the new SynthContext created in
getBaseline() should use non-null "SynthStyle.style", no?
--
Best regards, Sergey.
More information about the swing-dev
mailing list