code: public static void setup() {
          // Set the various and sundry OS X-specific system properties
          System.setProperty("apple.laf.useScreenMenuBar", "true");
          System.setProperty("dock:name", "ZAP"); // Broken and unfixed; thanks, Apple
          System.setProperty("com.apple.mrj.application.apple.menu.about.name", "ZAP"); // more thx
  
          // Override various handlers, so that About, Preferences, and Quit behave in an OS X typical fashion.
          LOGGER.info("Initializing OS X specific settings, despite Apple's best efforts");
  
          // TODO Remove the menu item File -> Exit, redundant with quit handler.
  
          try {
              InvocationHandler invocationHandler = (o, m, args) -> {
                  // Same method names for both APIs.
                  switch (m.getName()) {
                  case "handleAbout":
                      showAboutDialog();
                      break;
                  case "handlePreferences":
                      showOptionsDialog();
                      break;
                  case "handleQuitRequestWith":
                      exitZap();
                      break;
                  }
                  return null;
              };
  
              if (SystemUtils.IS_JAVA_1_8) {
                  // TODO Remove once targeting Java 9+ (and stop using reflection).
                  setupJava8(invocationHandler);
              } else {
                  setupJava9Plus(invocationHandler);
              }
          } catch (Throwable e) {
              LOGGER.error("Failed to set up all macOS GUI changes:", e);
          }
      }
docs: Setups the GUI of ZAP for OSX.
  <p>
  Sets OS X related GUI properties and functionalities.