JIDE: fixed null font in other Lafs if (wrongly) using LookAndFeelFactory.addUIDefaultsInitializer() or LookAndFeelFactory.addUIDefaultsCustomizer() (issue #288)

This commit is contained in:
Karl Tauber
2021-04-06 18:35:48 +02:00
parent 277c288952
commit e35fc8620c
2 changed files with 16 additions and 0 deletions

View File

@@ -833,6 +833,10 @@ public abstract class FlatLaf
public Object createValue( UIDefaults table ) {
Font defaultFont = UIManager.getFont( "defaultFont" );
// fallback (to avoid NPE in case that this is used in another Laf)
if( defaultFont == null )
defaultFont = UIManager.getFont( "Label.font" );
if( lastDefaultFont != defaultFont ) {
lastDefaultFont = defaultFont;