Java java.awt MenuItem fields, constructors, methods, implement or subclass

Example usage for Java java.awt MenuItem fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt MenuItem.

The text is from its open source code.

Constructor

MenuItem(String label)
Constructs a new MenuItem with the specified label and no keyboard shortcut.
MenuItem(String label, MenuShortcut s)
Create a menu item with an associated keyboard shortcut.
MenuItem()
Constructs a new MenuItem with an empty label and no keyboard shortcut.

Method

voidaddActionListener(ActionListener l)
Adds the specified action listener to receive action events from this menu item.
StringgetLabel()
Gets the label for this menu item.
voidsetActionCommand(String command)
Sets the command name of the action event that is fired by this menu item.
voidsetEnabled(boolean b)
Sets whether or not this menu item can be chosen.
voidsetFont(Font f)
Sets the font to be used for this menu component to the specified font.
voidsetLabel(String label)
Sets the label for this menu item to the specified label.
voidsetName(String name)
Sets the name of the component to the specified string.