⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jmenubar.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<A NAME="JMenuBar()"><!-- --></A><H3>JMenuBar</H3><PRE>public <B>JMenuBar</B>()</PRE><DL><DD>Creates a new menu bar.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getUI()"><!-- --></A><H3>getUI</H3><PRE>public <A HREF="../../javax/swing/plaf/MenuBarUI.html">MenuBarUI</A> <B>getUI</B>()</PRE><DL><DD>Returns the menubar's current UI.<DD><DL></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/JMenuBar.html#setUI(javax.swing.plaf.MenuBarUI)"><CODE>setUI(javax.swing.plaf.MenuBarUI)</CODE></A></DL></DD></DL><HR><A NAME="setUI(javax.swing.plaf.MenuBarUI)"><!-- --></A><H3>setUI</H3><PRE>public void <B>setUI</B>(<A HREF="../../javax/swing/plaf/MenuBarUI.html">MenuBarUI</A>&nbsp;ui)</PRE><DL><DD>Sets the L&F object that renders this component.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ui</CODE> - the new MenuBarUI L&F object<DT><B>See Also: </B><DD><A HREF="../../javax/swing/UIDefaults.html#getUI(javax.swing.JComponent)"><CODE>UIDefaults.getUI(javax.swing.JComponent)</CODE></A></DL></DD></DL><HR><A NAME="updateUI()"><!-- --></A><H3>updateUI</H3><PRE>public void <B>updateUI</B>()</PRE><DL><DD>Notification from the <code>UIFactory</code> that the L&F has changed.  Called to replace the UI with the latest version from the  <code>UIFactory</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../javax/swing/JComponent.html#updateUI()">updateUI</A></CODE> in class <CODE><A HREF="../../javax/swing/JComponent.html">JComponent</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/JComponent.html#updateUI()"><CODE>JComponent.updateUI()</CODE></A></DL></DD></DL><HR><A NAME="getUIClassID()"><!-- --></A><H3>getUIClassID</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getUIClassID</B>()</PRE><DL><DD>Returns the name of the L&F class that renders this component.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../javax/swing/JComponent.html#getUIClassID()">getUIClassID</A></CODE> in class <CODE><A HREF="../../javax/swing/JComponent.html">JComponent</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the string "MenuBarUI"<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JComponent.html#getUIClassID()"><CODE>JComponent.getUIClassID()</CODE></A>, <A HREF="../../javax/swing/UIDefaults.html#getUI(javax.swing.JComponent)"><CODE>UIDefaults.getUI(javax.swing.JComponent)</CODE></A></DL></DD></DL><HR><A NAME="getSelectionModel()"><!-- --></A><H3>getSelectionModel</H3><PRE>public <A HREF="../../javax/swing/SingleSelectionModel.html">SingleSelectionModel</A> <B>getSelectionModel</B>()</PRE><DL><DD>Returns the model object that handles single selections.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <code>SingleSelectionModel</code> property<DT><B>See Also: </B><DD><A HREF="../../javax/swing/SingleSelectionModel.html"><CODE>SingleSelectionModel</CODE></A></DL></DD></DL><HR><A NAME="setSelectionModel(javax.swing.SingleSelectionModel)"><!-- --></A><H3>setSelectionModel</H3><PRE>public void <B>setSelectionModel</B>(<A HREF="../../javax/swing/SingleSelectionModel.html">SingleSelectionModel</A>&nbsp;model)</PRE><DL><DD>Sets the model object to handle single selections.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>model</CODE> - the <code>SingleSelectionModel</code> to use<DT><B>See Also: </B><DD><A HREF="../../javax/swing/SingleSelectionModel.html"><CODE>SingleSelectionModel</CODE></A></DL></DD></DL><HR><A NAME="add(javax.swing.JMenu)"><!-- --></A><H3>add</H3><PRE>public <A HREF="../../javax/swing/JMenu.html">JMenu</A> <B>add</B>(<A HREF="../../javax/swing/JMenu.html">JMenu</A>&nbsp;c)</PRE><DL><DD>Appends the specified menu to the end of the menu bar.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the <code>JMenu</code> component to add<DT><B>Returns:</B><DD>the menu component</DL></DD></DL><HR><A NAME="getMenu(int)"><!-- --></A><H3>getMenu</H3><PRE>public <A HREF="../../javax/swing/JMenu.html">JMenu</A> <B>getMenu</B>(int&nbsp;index)</PRE><DL><DD>Returns the menu at the specified position in the menu bar.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - an integer giving the position in the menu bar, where               0 is the first position<DT><B>Returns:</B><DD>the <code>JMenu</code> at that position, or <code>null</code> if 		if there is no <code>JMenu</code> at that position (ie. if		it is a <code>JMenuItem</code>)</DL></DD></DL><HR><A NAME="getMenuCount()"><!-- --></A><H3>getMenuCount</H3><PRE>public int <B>getMenuCount</B>()</PRE><DL><DD>Returns the number of items in the menu bar.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of items in the menu bar</DL></DD></DL><HR><A NAME="setHelpMenu(javax.swing.JMenu)"><!-- --></A><H3>setHelpMenu</H3><PRE>public void <B>setHelpMenu</B>(<A HREF="../../javax/swing/JMenu.html">JMenu</A>&nbsp;menu)</PRE><DL><DD>Sets the help menu that appears when the user selects the "help" option in the menu bar. This method is not yet implemented and will throw an exception.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>menu</CODE> - the JMenu that delivers help to the user</DL></DD></DL><HR><A NAME="getHelpMenu()"><!-- --></A><H3>getHelpMenu</H3><PRE>public <A HREF="../../javax/swing/JMenu.html">JMenu</A> <B>getHelpMenu</B>()</PRE><DL><DD>Gets the help menu for the menu bar.  This method is not yet  implemented and will throw an exception.<DD><DL></DL></DD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -