docs: public void enablePreferencesMenuItem(boolean b) {
          getPreferencesMenuItem().setEnabled(b);
          if (MainFrame.MAC_OS_X) {
              if (osxPrefsEnableMethod != null) {
                  Object args[] = { b };
                  try {
                      osxPrefsEnableMethod.invoke(osxAdapter, args);
                  } catch (Exception e) {
                      System.err.println("Exception while enabling Preferences menu: " + e);
                  }
              }
          }
      }