<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<meta name="collection" content="api">
<!-- Generated by javadoc (build 1.5.0-rc) on Wed Aug 11 07:22:17 PDT 2004 -->
<TITLE>
MenuComponent (Java 2 Platform SE 5.0)
</TITLE>

<META NAME="keywords" CONTENT="java.awt.MenuComponent class">
<META NAME="keywords" CONTENT="getName()">
<META NAME="keywords" CONTENT="setName()">
<META NAME="keywords" CONTENT="getParent()">
<META NAME="keywords" CONTENT="getPeer()">
<META NAME="keywords" CONTENT="getFont()">
<META NAME="keywords" CONTENT="setFont()">
<META NAME="keywords" CONTENT="removeNotify()">
<META NAME="keywords" CONTENT="postEvent()">
<META NAME="keywords" CONTENT="dispatchEvent()">
<META NAME="keywords" CONTENT="processEvent()">
<META NAME="keywords" CONTENT="paramString()">
<META NAME="keywords" CONTENT="toString()">
<META NAME="keywords" CONTENT="getTreeLock()">
<META NAME="keywords" CONTENT="getAccessibleContext()">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="MenuComponent (Java 2 Platform SE 5.0)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MenuComponent.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../java/awt/MenuBar.AccessibleAWTMenuBar.html" title="class in java.awt"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../java/awt/MenuComponent.AccessibleAWTMenuComponent.html" title="class in java.awt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?java/awt/MenuComponent.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MenuComponent.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
java.awt</FONT>
<BR>
Class MenuComponent</H2>
<PRE>
<A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>java.awt.MenuComponent</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../java/io/Serializable.html" title="interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../java/awt/MenuBar.html" title="class in java.awt">MenuBar</A>, <A HREF="../../java/awt/MenuItem.html" title="class in java.awt">MenuItem</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>MenuComponent</B><DT>extends <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A><DT>implements <A HREF="../../java/io/Serializable.html" title="interface in java.io">Serializable</A></DL>
</PRE>

<P>
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>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>JDK1.0</DD>
<DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#java.awt.MenuComponent">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.AccessibleAWTMenuComponent.html" title="class in java.awt">MenuComponent.AccessibleAWTMenuComponent</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inner class of <code>MenuComponent</code> used to provide
 default support for accessibility.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#MenuComponent()">MenuComponent</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>MenuComponent</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#dispatchEvent(java.awt.AWTEvent)">dispatchEvent</A></B>(<A HREF="../../java/awt/AWTEvent.html" title="class in java.awt">AWTEvent</A>&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../javax/accessibility/AccessibleContext.html" title="class in javax.accessibility">AccessibleContext</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>AccessibleContext</code> associated with 
 this <code>MenuComponent</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../java/awt/Font.html" title="class in java.awt">Font</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#getFont()">getFont</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the font used for this menu component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#getName()">getName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of the menu component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../java/awt/MenuContainer.html" title="interface in java.awt">MenuContainer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#getParent()">getParent</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the parent container for this menu component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.peer.MenuComponentPeer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#getPeer()">getPeer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1,
 programs should not directly manipulate peers.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#getTreeLock()">getTreeLock</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets this component's locking object (the object that owns the thread 
 sychronization monitor) for AWT component-tree and layout
 operations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#paramString()">paramString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representing the state of this
 <code>MenuComponent</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#postEvent(java.awt.Event)">postEvent</A></B>(<A HREF="../../java/awt/Event.html" title="class in java.awt">Event</A>&nbsp;evt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <A HREF="../../java/awt/MenuComponent.html#dispatchEvent(java.awt.AWTEvent)"><CODE>dispatchEvent</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#processEvent(java.awt.AWTEvent)">processEvent</A></B>(<A HREF="../../java/awt/AWTEvent.html" title="class in java.awt">AWTEvent</A>&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Processes events occurring on this menu component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#removeNotify()">removeNotify</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the menu component's peer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#setFont(java.awt.Font)">setFont</A></B>(<A HREF="../../java/awt/Font.html" title="class in java.awt">Font</A>&nbsp;f)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the font to be used for this menu component to the specified 
 font.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#setName(java.lang.String)">setName</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the name of the component to the specified string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/awt/MenuComponent.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a representation of this menu component as a string.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="MenuComponent()"><!-- --></A><H3>
MenuComponent</H3>
<PRE>
public <B>MenuComponent</B>()
              throws <A HREF="../../java/awt/HeadlessException.html" title="class in java.awt">HeadlessException</A></PRE>
<DL>
<DD>Creates a <code>MenuComponent</code>.
<P>
<DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/awt/HeadlessException.html" title="class in java.awt">HeadlessException</A></CODE> - if
    <code>GraphicsEnvironment.isHeadless</code>
    returns <code>true</code><DT><B>See Also:</B><DD><A HREF="../../java/awt/GraphicsEnvironment.html#isHeadless()"><CODE>GraphicsEnvironment.isHeadless()</CODE></A></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>getName</B>()</PRE>
<DL>
<DD>Gets the name of the menu component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the name of the menu component<DT><B>Since:</B></DT>
  <DD>JDK1.1</DD>
<DT><B>See Also:</B><DD><A HREF="../../java/awt/MenuComponent.html#setName(java.lang.String)"><CODE>setName(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
public void <B>setName</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name)</PRE>
<DL>
<DD>Sets the name of the component to the specified string.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the menu component<DT><B>Since:</B></DT>
  <DD>JDK1.1</DD>
<DT><B>See Also:</B><DD><A HREF="../../java/awt/MenuComponent.html#getName()"><CODE>getName()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../java/awt/MenuContainer.html" title="interface in java.awt">MenuContainer</A> <B>getParent</B>()</PRE>
<DL>
<DD>Returns the parent container for this menu component.
<P>
<DD><DL>
</DL>
</DD>
<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>
<HR>

<A NAME="getPeer()"><!-- --></A><H3>
getPeer</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../java/lang/Deprecated.html" title="annotation in java.lang">@Deprecated</A>
</FONT>public java.awt.peer.MenuComponentPeer <B>getPeer</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1,
 programs should not directly manipulate peers.</I>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getFont()"><!-- --></A><H3>
getFont</H3>
<PRE>
public <A HREF="../../java/awt/Font.html" title="class in java.awt">Font</A> <B>getFont</B>()</PRE>
<DL>
<DD>Gets the font used for this menu component.
<P>
<DD><DL>
</DL>
</DD>
<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="../../java/awt/MenuComponent.html#setFont(java.awt.Font)"><CODE>setFont(java.awt.Font)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setFont(java.awt.Font)"><!-- --></A><H3>
setFont</H3>
<PRE>
public void <B>setFont</B>(<A HREF="../../java/awt/Font.html" title="class in java.awt">Font</A>&nbsp;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>
 Some platforms may not support setting of all font attributes 
 of a menu component; in such cases, calling <code>setFont</code>
 will have no effect on the unsupported font attributes of this 
 menu component.  Unless subcomponents of this menu component 
 specify a different font, this font will be used by those 
 subcomponents if supported by the underlying platform.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the font to be set<DT><B>See Also:</B><DD><A HREF="../../java/awt/MenuComponent.html#getFont()"><CODE>getFont()</CODE></A>, 
<A HREF="../../java/awt/Font.html#getAttributes()"><CODE>Font.getAttributes()</CODE></A>, 
<A HREF="../../java/awt/font/TextAttribute.html" title="class in java.awt.font"><CODE>TextAttribute</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeNotify()"><!-- --></A><H3>
removeNotify</H3>
<PRE>
public void <B>removeNotify</B>()</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>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="postEvent(java.awt.Event)"><!-- --></A><H3>
postEvent</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../java/lang/Deprecated.html" title="annotation in java.lang">@Deprecated</A>
</FONT>public boolean <B>postEvent</B>(<A HREF="../../java/awt/Event.html" title="class in java.awt">Event</A>&nbsp;evt)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <A HREF="../../java/awt/MenuComponent.html#dispatchEvent(java.awt.AWTEvent)"><CODE>dispatchEvent</CODE></A>.</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>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>evt</CODE> - the event which is to take place</DL>
</DD>
</DL>
<HR>

<A NAME="dispatchEvent(java.awt.AWTEvent)"><!-- --></A><H3>
dispatchEvent</H3>
<PRE>
public final void <B>dispatchEvent</B>(<A HREF="../../java/awt/AWTEvent.html" title="class in java.awt">AWTEvent</A>&nbsp;e)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="processEvent(java.awt.AWTEvent)"><!-- --></A><H3>
processEvent</H3>
<PRE>
protected void <B>processEvent</B>(<A HREF="../../java/awt/AWTEvent.html" title="class in java.awt">AWTEvent</A>&nbsp;e)</PRE>
<DL>
<DD>Processes events occurring on this menu component.  
 <p>Note that if the event parameter is <code>null</code>
 the behavior is unspecified and may result in an
 exception.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the event<DT><B>Since:</B></DT>
  <DD>JDK1.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="paramString()"><!-- --></A><H3>
paramString</H3>
<PRE>
protected <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>paramString</B>()</PRE>
<DL>
<DD>Returns a string representing the state of this
 <code>MenuComponent</code>. This method is intended to be used
 only for debugging purposes, and the content and format of the
 returned string may vary between implementations. The returned
 string may be empty but may not be <code>null</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the parameter string of this menu component</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Returns a representation of this menu component as a string.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a string representation of this menu component</DL>
</DD>
</DL>
<HR>

<A NAME="getTreeLock()"><!-- --></A><H3>
getTreeLock</H3>
<PRE>
protected final <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A> <B>getTreeLock</B>()</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>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>this component's locking object</DL>
</DD>
</DL>
<HR>

<A NAME="getAccessibleContext()"><!-- --></A><H3>
getAccessibleContext</H3>
<PRE>
public <A HREF="../../javax/accessibility/AccessibleContext.html" title="class in javax.accessibility">AccessibleContext</A> <B>getAccessibleContext</B>()</PRE>
<DL>
<DD>Gets the <code>AccessibleContext</code> associated with 
 this <code>MenuComponent</code>.

 The method implemented by this base class returns <code>null</code>.
 Classes that extend <code>MenuComponent</code>
 should implement this method to return the 
 <code>AccessibleContext</code> associated with the subclass.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the <code>AccessibleContext</code> of this
     <code>MenuComponent</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MenuComponent.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../java/awt/MenuBar.AccessibleAWTMenuBar.html" title="class in java.awt"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../java/awt/MenuComponent.AccessibleAWTMenuComponent.html" title="class in java.awt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?java/awt/MenuComponent.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MenuComponent.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="../../../relnotes/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright &#169; 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to <a href="../../../relnotes/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>
<!-- Start SiteCatalyst code   -->
<script language="JavaScript" src="http://www.oracle.com/ocom/groups/systemobject/@mktg_admin/documents/systemobject/s_code_download.js"></script>
<script language="JavaScript" src="http://www.oracle.com/ocom/groups/systemobject/@mktg_admin/documents/systemobject/s_code.js"></script>
 
<!-- ********** DO NOT ALTER ANYTHING BELOW THIS LINE ! *********** -->
<!--  Below code will send the info to Omniture server -->
<script language="javascript">var s_code=s.t();if(s_code)document.write(s_code)</script>
 
<!-- End SiteCatalyst code -->
</body>
</HTML>
