📄 jmenu.html
字号:
Creates a new menu item attached to the specified <code>Action</code> object and appends it to the end of this menu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Component.html">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#add(java.awt.Component)">add</A></B>(<A HREF="../../java/awt/Component.html">Component</A> c)</CODE><BR> Appends a component to the end of this menu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Component.html">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#add(java.awt.Component, int)">add</A></B>(<A HREF="../../java/awt/Component.html">Component</A> c, int index)</CODE><BR> Adds the specified component to this container at the given position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/JMenuItem.html">JMenuItem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#add(javax.swing.JMenuItem)">add</A></B>(<A HREF="../../javax/swing/JMenuItem.html">JMenuItem</A> menuItem)</CODE><BR> Appends a menu item to the end of this menu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/JMenuItem.html">JMenuItem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#add(java.lang.String)">add</A></B>(<A HREF="../../java/lang/String.html">String</A> s)</CODE><BR> Creates a new menu item with the specified text and appends it to the end of this menu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#addMenuListener(javax.swing.event.MenuListener)">addMenuListener</A></B>(<A HREF="../../javax/swing/event/MenuListener.html">MenuListener</A> l)</CODE><BR> Adds a listener for menu events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#addSeparator()">addSeparator</A></B>()</CODE><BR> Appends a new separator to the end of the menu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#createActionChangeListener(javax.swing.JMenuItem)">createActionChangeListener</A></B>(<A HREF="../../javax/swing/JMenuItem.html">JMenuItem</A> b)</CODE><BR> Returns a properly configured <code>PropertyChangeListener</code> which updates the control as changes to the <code>Action</code> occur.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../javax/swing/JMenuItem.html">JMenuItem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#createActionComponent(javax.swing.Action)">createActionComponent</A></B>(<A HREF="../../javax/swing/Action.html">Action</A> a)</CODE><BR> Factory method which creates the <code>JMenuItem</code> for <code>Action</code>s added to the <code>JMenu</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../javax/swing/JMenu.WinListener.html">JMenu.WinListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#createWinListener(javax.swing.JPopupMenu)">createWinListener</A></B>(<A HREF="../../javax/swing/JPopupMenu.html">JPopupMenu</A> p)</CODE><BR> Creates a window-closing listener for the popup.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#doClick(int)">doClick</A></B>(int pressTime)</CODE><BR> Programatically performs a "click".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#fireMenuCanceled()">fireMenuCanceled</A></B>()</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#fireMenuDeselected()">fireMenuDeselected</A></B>()</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#fireMenuSelected()">fireMenuSelected</A></B>()</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE><BR> Gets the AccessibleContext associated with this JMenu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Component.html">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#getComponent()">getComponent</A></B>()</CODE><BR> Returns the <code>java.awt.Component</code> used to paint this <code>MenuElement</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#getDelay()">getDelay</A></B>()</CODE><BR> Returns the suggested delay, in milliseconds, before submenus are popped up or down.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/JMenuItem.html">JMenuItem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JMenu.html#getItem(int)">getItem</A></B>(int pos)</CODE><BR> Returns the <code>JMenuItem</code> at the specified position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -