Here you can find the source of createMenuInMenuBar(final JMenuBar menuBar, final String menuName)
Parameter | Description |
---|---|
menuBar | a parameter |
menuName | a parameter |
public static JMenu createMenuInMenuBar(final JMenuBar menuBar, final String menuName)
//package com.java2s; // LICENSE: This file is distributed under the BSD license. import javax.swing.*; public class Main { /**/*from w w w. ja va2s . c om*/ * Adds a menu to the specified menu bar. * @param menuBar * @param menuName * @return */ public static JMenu createMenuInMenuBar(final JMenuBar menuBar, final String menuName) { final JMenu menu = new JMenu(); menu.setText(menuName); menuBar.add(menu); return menu; } }