Example usage for javax.swing JMenu setActionCommand

List of usage examples for javax.swing JMenu setActionCommand

Introduction

In this page you can find the example usage for javax.swing JMenu setActionCommand.

Prototype

public void setActionCommand(String actionCommand) 

Source Link

Document

Sets the action command for this button.

Usage

From source file:TreeUtil.java

/**
 * Makes menus from the root node//from  ww  w. ja  va 2 s .  co  m
 */
public JMenuItem getMenus() {
    JMenu rootMenu = new JMenu(itsRootNode.getUserObject().toString());
    rootMenu.setActionCommand("TreeMenu");
    rootMenu.addActionListener(this);
    return getMenus(itsRootNode, rootMenu);
}