Introduction
MenuComponent is an abstract class and is the superclass for all menu-related components.
Class declaration
Following is the declaration for java.awt.MenuComponent class:
public abstract class MenuComponent extends Object implements Serializable
Class constructors
S.N. | Constructor & Description |
---|---|
1 | MenuComponent()Creates a MenuComponent. |
Class methods
void dispatchEvent(AWTEvent e)
S.N. | Method & Description |
---|---|
1 | AccessibleContext getAccessibleContext()Gets the AccessibleContext associated with this MenuComponent. |
2 | Font getFont()Gets the font used for this menu component. |
3 | String getName()Gets the name of the menu component. |
4 | MenuContainer getParent()Returns the parent container for this menu component. |
5 | java.awt.peer.MenuComponentPeer getPeer()Deprecated. As of JDK version 1.1, programs should not directly manipulate peers. |
6 | protected Object getTreeLock()Gets this component’s locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations. |
7 | protected String paramString()Returns a string representing the state of this MenuComponent. |
8 | boolean postEvent(Event evt)Deprecated. As of JDK version 1.1, replaced by dispatchEvent. |
9 | protected void processEvent(AWTEvent e)Processes events occurring on this menu component. |
10 | void removeNotify()Removes the menu component’s peer. |
11 | void setFont(Font f)Sets the font to be used for this menu component to the specified font. |
12 | void setName(String name)Sets the name of the component to the specified string. |
13 | String toString()Returns a representation of this menu component as a string. |
Methods inherited
This class inherits methods from the following classes:
- java.lang.Object
Previous Page:-Click Here
Pingback: AWT Menu Classes - Adglob Infosystem Pvt Ltd
Pingback: briansclub 2023
Pingback: Event booth builder