Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javax.swing.*;
import java.awt.*;

public class Main {
    static private Font defaultFont = new Font("Arial", Font.PLAIN, 12);

    static public JMenu createJMenu(JMenuBar pMenuBar, String pMenuText, char pMnemonic) {
        final JMenu menu = new JMenu(pMenuText);
        menu.setMnemonic(pMnemonic);

        if (defaultFont != null)
            menu.setFont(defaultFont);

        pMenuBar.add(menu);
        return menu;
    }
}