Example usage for Java java.awt MenuItem fields, constructors, methods, implement or subclass
The text is from its open source code.
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. |
void | addActionListener(ActionListener l) Adds the specified action listener to receive action events from this menu item. |
String | getLabel() Gets the label for this menu item. |
void | setActionCommand(String command) Sets the command name of the action event that is fired by this menu item. |
void | setEnabled(boolean b) Sets whether or not this menu item can be chosen. |
void | setFont(Font f) Sets the font to be used for this menu component to the specified font. |
void | setLabel(String label) Sets the label for this menu item to the specified label. |
void | setName(String name) Sets the name of the component to the specified string. |