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

📄 jmenubar.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD><DL><DT><B>Returns:</B><DD>the <code>JMenu</code> that delivers help to the user</DL></DD></DL><HR><A NAME="getComponentAtIndex(int)"><!-- --></A><H3>getComponentAtIndex</H3><PRE>public <A HREF="../../java/awt/Component.html">Component</A> <B>getComponentAtIndex</B>(int&nbsp;i)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>replaced by <code>getComponent(int i)</code></I><P><DD>Returns the component at the specified index.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - an integer specifying the position, where 0 is first<DT><B>Returns:</B><DD>the <code>Component</code> at the position,		or <code>null</code> for an invalid index</DL></DD></DL><HR><A NAME="getComponentIndex(java.awt.Component)"><!-- --></A><H3>getComponentIndex</H3><PRE>public int <B>getComponentIndex</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;c)</PRE><DL><DD>Returns the index of the specified component.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the <code>Component</code> to find<DT><B>Returns:</B><DD>an integer giving the component's position, where 0 is first;		or -1 if it can't be found</DL></DD></DL><HR><A NAME="setSelected(java.awt.Component)"><!-- --></A><H3>setSelected</H3><PRE>public void <B>setSelected</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;sel)</PRE><DL><DD>Sets the currently selected component, producing a a change to the selection model.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sel</CODE> - the <code>Component</code> to select</DL></DD></DL><HR><A NAME="isSelected()"><!-- --></A><H3>isSelected</H3><PRE>public boolean <B>isSelected</B>()</PRE><DL><DD>Returns true if the menu bar currently has a component selected.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if a selection has been made, else false</DL></DD></DL><HR><A NAME="isBorderPainted()"><!-- --></A><H3>isBorderPainted</H3><PRE>public boolean <B>isBorderPainted</B>()</PRE><DL><DD>Returns true if the menu bars border should be painted.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the border should be painted, else false</DL></DD></DL><HR><A NAME="setBorderPainted(boolean)"><!-- --></A><H3>setBorderPainted</H3><PRE>public void <B>setBorderPainted</B>(boolean&nbsp;b)</PRE><DL><DD>Sets whether the border should be painted.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - if true and border property is not <code>null</code>,		the border is painted.<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JMenuBar.html#isBorderPainted()"><CODE>isBorderPainted()</CODE></A></DL></DD></DL><HR><A NAME="paintBorder(java.awt.Graphics)"><!-- --></A><H3>paintBorder</H3><PRE>protected void <B>paintBorder</B>(<A HREF="../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</PRE><DL><DD>Paints the menubar's border if <code>BorderPainted</code> property is true.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../javax/swing/JComponent.html#paintBorder(java.awt.Graphics)">paintBorder</A></CODE> in class <CODE><A HREF="../../javax/swing/JComponent.html">JComponent</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the <code>Graphics</code> context to use for painting<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JComponent.html#paint(java.awt.Graphics)"><CODE>JComponent.paint(java.awt.Graphics)</CODE></A>, <A HREF="../../javax/swing/JComponent.html#setBorder(javax.swing.border.Border)"><CODE>JComponent.setBorder(javax.swing.border.Border)</CODE></A></DL></DD></DL><HR><A NAME="setMargin(java.awt.Insets)"><!-- --></A><H3>setMargin</H3><PRE>public void <B>setMargin</B>(<A HREF="../../java/awt/Insets.html">Insets</A>&nbsp;m)</PRE><DL><DD>Sets the margin between the menubar's border and its menus. Setting to <code>null</code> will cause the menubar to use the default margins.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>margin</CODE> - an Insets object containing the margin values<DT><B>See Also: </B><DD><A HREF="../../java/awt/Insets.html"><CODE>Insets</CODE></A></DL></DD></DL><HR><A NAME="getMargin()"><!-- --></A><H3>getMargin</H3><PRE>public <A HREF="../../java/awt/Insets.html">Insets</A> <B>getMargin</B>()</PRE><DL><DD>Returns the margin between the menubar's border and its menus.  If there is no previous margin, it will create a default margin with zero size.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an <code>Insets</code> object containing the margin values<DT><B>See Also: </B><DD><A HREF="../../java/awt/Insets.html"><CODE>Insets</CODE></A></DL></DD></DL><HR><A NAME="processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)"><!-- --></A><H3>processMouseEvent</H3><PRE>public void <B>processMouseEvent</B>(<A HREF="../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;event,                              <A HREF="../../javax/swing/MenuElement.html">MenuElement</A>[]&nbsp;path,                              <A HREF="../../javax/swing/MenuSelectionManager.html">MenuSelectionManager</A>&nbsp;manager)</PRE><DL><DD>Implemented to be a <code>MenuElement</code> -- does nothing.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/MenuElement.html#processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)">processMouseEvent</A></CODE> in interface <CODE><A HREF="../../javax/swing/MenuElement.html">MenuElement</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/JMenuBar.html#getSubElements()"><CODE>getSubElements()</CODE></A></DL></DD></DL><HR><A NAME="processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)"><!-- --></A><H3>processKeyEvent</H3><PRE>public void <B>processKeyEvent</B>(<A HREF="../../java/awt/event/KeyEvent.html">KeyEvent</A>&nbsp;e,                            <A HREF="../../javax/swing/MenuElement.html">MenuElement</A>[]&nbsp;path,                            <A HREF="../../javax/swing/MenuSelectionManager.html">MenuSelectionManager</A>&nbsp;manager)</PRE><DL><DD>Implemented to be a <code>MenuElement</code> -- does nothing.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/MenuElement.html#processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)">processKeyEvent</A></CODE> in interface <CODE><A HREF="../../javax/swing/MenuElement.html">MenuElement</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/JMen

⌨️ 快捷键说明

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