<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.MenuComponent
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.MenuBar.html#_top_">Previous</a>  <a href="java.awt.MenuItem.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.MenuComponent
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.MenuComponent
</pre>
<hr>
<dl>
  <dt> public abstract class <b>MenuComponent</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
The abstract class <code>MenuComponent</code> is the superclass
 of all menu-related components. In this respect, the class
 <code>MenuComponent</code> is analogous to the abstract superclass
 <code>Component</code> for AWT components.
 <p>
 Menu components receive and process AWT events, just as components do,
 through the method <code>processEvent</code>.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#MenuComponent()"><b>MenuComponent</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#dispatchEvent(java.awt.AWTEvent)"><b>dispatchEvent</b></a>(AWTEvent)
  <dd> 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFont()"><b>getFont</b></a>()
  <dd>  Gets the font used for this menu component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getName()"><b>getName</b></a>()
  <dd>  Gets the name of the menu component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getParent()"><b>getParent</b></a>()
  <dd>  Returns the parent container for this menu component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getPeer()"><b>getPeer</b></a>()
  <dd>  
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTreeLock()"><b>getTreeLock</b></a>()
  <dd>  Gets this component's locking object (the object that owns the thread
 sychronization monitor) for AWT component-tree and layout
 operations.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#paramString()"><b>paramString</b></a>()
  <dd>  Returns the parameter string representing the state of this
 menu component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#postEvent(java.awt.Event)"><b>postEvent</b></a>(Event)
  <dd>  Posts the specified event to the menu.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#processEvent(java.awt.AWTEvent)"><b>processEvent</b></a>(AWTEvent)
  <dd>  Processes events occurring on this menu component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#removeNotify()"><b>removeNotify</b></a>()
  <dd>  Removes the menu component's peer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setFont(java.awt.Font)"><b>setFont</b></a>(Font)
  <dd>  Sets the font to be used for this menu component to the specified
 font.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setName(java.lang.String)"><b>setName</b></a>(String)
  <dd>  Sets the name of the component to the specified string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Returns a representation of this menu component as a string.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="MenuComponent"></a>
<a name="MenuComponent()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>MenuComponent</b>
<pre>
 public MenuComponent()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getName()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getName"><b>getName</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getName()
</pre>
<dl>
  <dd> Gets the name of the menu component.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the name of the menu component.
    <dt> <b>See Also:</b>
    <dd> <a href="#setName(java.lang.String)">setName</a>
  </dl></dd>
</dl>
<a name="setName(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setName"><b>setName</b></a>
<pre>
 public void setName(<a href="java.lang.String.html#_top_">String</a> name)
</pre>
<dl>
  <dd> Sets the name of the component to the specified string.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> name - the name of the menu component.
    <dt> <b>See Also:</b>
    <dd> <a href="#getName">getName</a>
  </dl></dd>
</dl>
<a name="getParent()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getParent"><b>getParent</b></a>
<pre>
 public <a href="java.awt.MenuContainer.html#_top_">MenuContainer</a> getParent()
</pre>
<dl>
  <dd> Returns the parent container for this menu component.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the menu component containing this menu component,
                 or <code>null</code> if this menu component
                 is the outermost component, the menu bar itself.
  </dl></dd>
</dl>
<a name="getPeer()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getPeer"><b>getPeer</b></a>
<pre>
 public <a href="java.awt.peer.MenuComponentPeer.html#_top_">MenuComponentPeer</a> getPeer()
</pre>
<dl>
<dd><b> Note: getPeer() is deprecated.</b>
<i>As of JDK version 1.1,
 programs should not directly manipulate peers.</i>
<p>
</dl>
<a name="getFont()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFont"><b>getFont</b></a>
<pre>
 public <a href="java.awt.Font.html#_top_">Font</a> getFont()
</pre>
<dl>
  <dd> Gets the font used for this menu component.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the font used in this menu component, if there is one;
                  <code>null</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#setFont">setFont</a>
  </dl></dd>
</dl>
<a name="setFont(java.awt.Font)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setFont"><b>setFont</b></a>
<pre>
 public void setFont(<a href="java.awt.Font.html#_top_">Font</a> f)
</pre>
<dl>
  <dd> Sets the font to be used for this menu component to the specified
 font. This font is also used by all subcomponents of this menu
 component, unless those subcomponents specify a different font.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> f - the font to be set.
    <dt> <b>See Also:</b>
    <dd> <a href="#getFont">getFont</a>
  </dl></dd>
</dl>
<a name="removeNotify()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="removeNotify"><b>removeNotify</b></a>
<pre>
 public void removeNotify()
</pre>
<dl>
  <dd> Removes the menu component's peer.  The peer allows us to modify the
 appearance of the menu component without changing the functionality of
 the menu component.
<p>
</dl>
<a name="postEvent(java.awt.Event)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="postEvent"><b>postEvent</b></a>
<pre>
 public boolean postEvent(<a href="java.awt.Event.html#_top_">Event</a> evt)
</pre>
<dl>
<dd><b> Note: postEvent() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>dispatchEvent(AWTEvent)</code>.</i>
<p>
  <dd> Posts the specified event to the menu.
 This method is part of the Java&nbsp;1.0 event system
 and it is maintained only for backwards compatibility.
 Its use is discouraged, and it may not be supported
 in the future.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> evt - the event which is to take place
  </dl></dd>
</dl>
<a name="dispatchEvent(java.awt.AWTEvent)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="dispatchEvent"><b>dispatchEvent</b></a>
<pre>
 public final void dispatchEvent(<a href="java.awt.AWTEvent.html#_top_">AWTEvent</a> e)
</pre>
<a name="processEvent(java.awt.AWTEvent)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="processEvent"><b>processEvent</b></a>
<pre>
 protected void processEvent(<a href="java.awt.AWTEvent.html#_top_">AWTEvent</a> e)
</pre>
<dl>
  <dd> Processes events occurring on this menu component.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> e - the event
  </dl></dd>
</dl>
<a name="paramString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="paramString"><b>paramString</b></a>
<pre>
 protected <a href="java.lang.String.html#_top_">String</a> paramString()
</pre>
<dl>
  <dd> Returns the parameter string representing the state of this
 menu component. This string is useful for debugging.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the parameter string of this menu component.
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Returns a representation of this menu component as a string.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this menu component.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="getTreeLock()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTreeLock"><b>getTreeLock</b></a>
<pre>
 protected final <a href="java.lang.Object.html#_top_">Object</a> getTreeLock()
</pre>
<dl>
  <dd> Gets this component's locking object (the object that owns the thread
 sychronization monitor) for AWT component-tree and layout
 operations.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> This component's locking object.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.MenuBar.html#_top_">Previous</a>  <a href="java.awt.MenuItem.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
