Beispiel #1
0
  /**
   * Creates the help menu.
   *
   * <p>The help menu contains an "About" item, to display some software information.
   *
   * @return the newly created help menu.
   */
  private JMenu createHelpMenu() {
    JMenu helpMenu = new JMenu("Help");
    helpMenu.setMnemonic('h');

    JMenuItem about = new JMenuItem("About");
    about.setMnemonic('a');
    about.addActionListener(
        e ->
            JOptionPane.showMessageDialog(
                menuBar.getParent(),
                String.format(
                    "Extremely simple Markdown to HTML converter%nPowered by MarkdownJ%nhttps://github.com/nilhcem"),
                "Markdown2HTML: About",
                JOptionPane.INFORMATION_MESSAGE));

    helpMenu.add(about);
    return helpMenu;
  }