Spotlight for Help in localized Java Swing applications on macOS
问题 In Java Swing applications on macOS, Cocoa automatically binds a search field called Spotlight for Help to the first menu labelled “Help” in a frame’s menu bar, when using the macOS look and feel and a screen menu bar. System.setProperty("apple.laf.useScreenMenuBar", "true"); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } JFrame frame = new JFrame(); JMenuBar menuBar = new JMenuBar(); JMenu helpMenu = new JMenu("Help")