Java Swing Menu createMenu(final String text)

Here you can find the source of createMenu(final String text)

Description

create Menu

License

Open Source License

Declaration

public static JMenu createMenu(final String text) 

Method Source Code

//package com.java2s;
/**//from   ww  w  .  j a  v a 2  s.  c o  m
 * Menu creation helper functions
 *
 * @author Tamara Orr
 * See MIT license in license.txt
 */

import javax.swing.JMenu;

public class Main {
    public static JMenu createMenu(final String text) {
        return new JMenu(text);
    }

    public static JMenu createMenu(final String text, final int mnemonic) {
        JMenu menu = createMenu(text);
        menu.setMnemonic(mnemonic);
        return menu;
    }
}

Related

  1. buildManualsMenu(File appDir)
  2. constructViewMenu(ActionListener act, boolean showUMLOption, boolean showShortenedSourceOption, boolean showJavadocsOption, boolean showSourceOption)
  3. createActionMenu(JTextComponent text, boolean includeModifying)
  4. createMenu(final String label, final String mnemonic, final String accessibleDescription)
  5. createMenu(final String name, final int mnemonic)
  6. createMenu(final String text, final char mnemonic)
  7. createMenu(String label, int mnemonic, String description)
  8. createMenu(String label, Object... objects)
  9. createMenu(String name, Object[] item, int[] accelerator, ActionListener listener)