Method add(Action a)
Return type:
javax.swing.JMenuItem
Member of:
javax.swing.JMenu
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
_menu.add(this);
2
Component c = add(a);
3
helpMenu.add(new LocalizedAction(ResourceKeys.ABOUT_MENUITEM) {
4
JMenuItem menuItem = menu.add(action);
5
optionsMenu.add(new AbstractAction("Scheduling Lookahead...", null) {
6
fileMenu.add(new jmri.jmrit.decoderdefn.PrintDecoderListAction(frame));
7
menu.add( MenuFactory.getShowDesktopAction());
8
menu.add(new LocalizedAction(ResourceKeys.NEW_GAME_MENUITEM) {
9
menu.add(NEW_ACTION);
10
JMenuItem item = jmenu.add(new MenuAction_MDProfileEditor());
11
critiques.add(new ActionGoToCritique(itemUnderMouse));
12
advanceMenu.add(new AbstractAction(item.label) {
13
menuItem = menu.add(new OpenAction(container));
14
this.fileMenu.add(new ActionOpenDatabase(this));
15
menu_item = file_menu.add(action);
16
menu.add((Action)obj);
17
JMenuItem i = file.add(control.actNew);
18
menuitem = tmpObject.lMenu.add(action);
19
menu.add(a);
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.