public static void setPreferencesHandler( Runnable preferencesHandler ) {
		if( !isSupported( Action.APP_PREFERENCES ) )
			return;

		String handlerClassName;
		if( SystemInfo.isJava_9_orLater )
			handlerClassName = "java.awt.desktop.PreferencesHandler";
		else if( SystemInfo.isMacOS )
			handlerClassName = "com.apple.eawt.PreferencesHandler";
		else
			return;

		setHandler( "setPreferencesHandler", handlerClassName, preferencesHandler );
	}
Sets a handler to show a custom Preferences dialog.
<p>
Useful for macOS to enable menu item "MyApp &gt; Preferences".
<p>
Uses:
<ul>
<li>Java 8 on macOS: com.apple.eawt.Application.getApplication().setPreferencesHandler(com.apple.eawt.PreferencesHandler)
<li>Java 9+: java.awt.Desktop.getDesktop().setPreferencesHandler(java.awt.desktop.PreferencesHandler)
</ul>
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatDesktop.java