@Override
	public UIDefaults getDefaults() {
		// use larger initial capacity to avoid resizing UI defaults hash table
		// (from 610 to 1221 to 2443 entries) and to save some memory
		UIDefaults defaults = new FlatUIDefaults( 1500, 0.75f );

		// initialize basic defaults (see super.getDefaults())
		initClassDefaults( defaults );
		initSystemColorDefaults( defaults );
		initComponentDefaults( defaults );

		// add flag that indicates whether the LaF is light or dark
		// (can be queried without using FlatLaf API)
		defaults.put( "laf.dark", isDark() );

		// init resource bundle for localized texts
		initResourceBundle( defaults, "com.formdev.flatlaf.resources.Bundle" );

		// initialize some defaults (for overriding) that are used in UI delegates,
		// but are not set in BasicLookAndFeel
		putDefaults( defaults, defaults.getColor( "control" ),
			"Button.disabledBackground",
			"EditorPane.disabledBackground",
			"EditorPane.inactiveBackground",
			"FormattedTextField.disabledBackground",
			"PasswordField.disabledBackground",
			"RootPane.background",
			"Spinner.disabledBackground",
			"TextArea.disabledBackground",
			"TextArea.inactiveBackground",
			"TextField.disabledBackground",
			"TextPane.disabledBackground",
			"TextPane.inactiveBackground",
			"ToggleButton.disabledBackground" );
		putDefaults( defaults, defaults.getColor( "textInactiveText" ),
			"Button.disabledText",
			"CheckBox.disabledText",
			"CheckBoxMenuItem.disabledForeground",
			"Menu.disabledForeground",
			"MenuItem.disabledForeground",
			"RadioButton.disabledText",
			"RadioButtonMenuItem.disabledForeground",
			"Spinner.disabledForeground",
			"ToggleButton.disabledText" );
		putDefaults( defaults, defaults.getColor( "textText" ),
			"DesktopIcon.foreground",
			"RootPane.foreground" );

		initFonts( defaults );
		initIconColors( defaults, isDark() );
		FlatInputMaps.initInputMaps( defaults );

		// copy InternalFrame.icon (the Java cup) to TitlePane.icon
		// (using defaults.remove() to avoid that lazy value is resolved and icon loaded here)
		Object icon = defaults.remove( "InternalFrame.icon" );
		defaults.put( "InternalFrame.icon", icon );
		defaults.put( "TitlePane.icon", icon ); // no longer used, but keep for compatibility

		// get addons and sort them by priority
		ServiceLoader<FlatDefaultsAddon> addonLoader = ServiceLoader.load( FlatDefaultsAddon.class );
		List<FlatDefaultsAddon> addons = new ArrayList<>();
		for( FlatDefaultsAddon addon : addonLoader )
			addons.add( addon );
		addons.sort( (addon1, addon2) -> addon1.getPriority() - addon2.getPriority() );

		// load defaults from properties
		List<Class<?>> lafClassesForDefaultsLoading = getLafClassesForDefaultsLoading();
		if( lafClassesForDefaultsLoading == null )
			lafClassesForDefaultsLoading = UIDefaultsLoader.getLafClassesForDefaultsLoading( getClass() );
		UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, addons,
			this::applyAdditionalProperties, getAdditionalDefaults(), isDark(), defaults );

		// setup default font after loading defaults from properties
		// to allow defining "defaultFont" in properties
		initDefaultFont( defaults );

		// use Aqua MenuBarUI if Mac screen menubar is enabled
		if( SystemInfo.isMacOS && Boolean.getBoolean( "apple.laf.useScreenMenuBar" ) ) {
			defaults.put( "MenuBarUI", "com.apple.laf.AquaMenuBarUI" );

			// add defaults necessary for AquaMenuBarUI
			defaults.put( "MenuBar.backgroundPainter", BorderFactory.createEmptyBorder() );
		}

		// initialize text antialiasing
		putAATextInfo( defaults );

		// allow addons modifying UI defaults
		for( FlatDefaultsAddon addon : addons )
			addon.afterDefaultsLoading( this, defaults );

		// add user scale factor to allow layout managers (e.g. MigLayout) to use it
		defaults.put( "laf.scaleFactor", (ActiveValue) t -> {
			return UIScale.getUserScaleFactor();
		} );

		// add lazy UI delegate class loading (if necessary)
		addLazyUIdelegateClassLoading( defaults );

		if( postInitialization != null ) {
			postInitialization.accept( defaults );
			postInitialization = null;
		}

		return defaults;
	}
Initialize Aqua LaF on macOS, which is required for using Mac screen menubar.
(at least on Java 8, since 9 it seems to work without it)
<p>
This loads the native library "osxui" and initializes JRSUI.
Because both are not unloaded/uninitialized, Aqua LaF is initialized only once.
flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java