Java JMenuItem addIntoMenu(JMenu menu, JMenuItem[] menuItems)

Here you can find the source of addIntoMenu(JMenu menu, JMenuItem[] menuItems)

Description

Adds JMenuItems into specified JMenu.

License

Open Source License

Declaration

public static void addIntoMenu(JMenu menu, JMenuItem[] menuItems) 

Method Source Code

//package com.java2s;
/*// w  w w .  java 2s  . c om
 * Copyright 2001-2008 Aqris Software AS. All rights reserved.
 * 
 * This program is dual-licensed under both the Common Development
 * and Distribution License ("CDDL") and the GNU General Public
 * License ("GPL"). You may elect to use one or the other of these
 * licenses.
 */

import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class Main {
    /**
     * Adds JMenuItems into specified JMenu.
     */
    public static void addIntoMenu(JMenu menu, JMenuItem[] menuItems) {
        for (int i = 0; i < menuItems.length; i++) {
            menu.add(menuItems[i]);
        }
    }
}

Related

  1. about(JMenuItem anItem)
  2. addMenu(JMenu poMenuPadre, JMenuItem poElemento, int piPosicion)
  3. addMenuItem(final JMenuItem mi, final C topLevelMenu, final List path)
  4. aplicarMenu(JMenuItem loMenuO, JMenuItem loMenuD)
  5. applyDefaultProperties(final JMenuItem comp)