AWT MenuComponent Class

Advertisements


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
1MenuComponent()
Creates a MenuComponent.

Class methods

void dispatchEvent(AWTEvent e)
S.N.Method & Description
1AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this MenuComponent.
2Font getFont()
Gets the font used for this menu component.
3String getName()
Gets the name of the menu component.
4MenuContainer getParent()
Returns the parent container for this menu component.
5java.awt.peer.MenuComponentPeer getPeer()
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers.
6protected Object getTreeLock()
Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
7protected String paramString()
Returns a string representing the state of this MenuComponent.
8boolean postEvent(Event evt)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent.
9protected void processEvent(AWTEvent e)
Processes events occurring on this menu component.
10void removeNotify()
Removes the menu component's peer.
11void setFont(Font f)
Sets the font to be used for this menu component to the specified font.
12void setName(String name)
Sets the name of the component to the specified string.
13String toString()
Returns a representation of this menu component as a string.

Methods inherited

This class inherits methods from the following classes:

  • java.lang.Object



Advertisements
Advertisements