Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.swing.JMenu;

public class Main {
    /**
     * Convenience method for creating a JMenu
     * @param text the menu title
     * @param mnemonic the mnemonic for the menu
     * @return a new JMenu with the given title and mnemonic
     */
    public static JMenu menu(String text, char mnemonic) {
        final JMenu menu = new JMenu(text);
        menu.setMnemonic(mnemonic);
        return menu;
    }
}