📄 jlabel.html
字号:
<TD><CODE><B><A HREF="../../javax/swing/JLabel.html#getDisplayedMnemonic()">getDisplayedMnemonic</A></B>()</CODE><BR> Return the keycode that indicates a mnemonic key.</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/JLabel.html#getHorizontalAlignment()">getHorizontalAlignment</A></B>()</CODE><BR> Returns the alignment of the label's contents along the X axis.</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/JLabel.html#getHorizontalTextPosition()">getHorizontalTextPosition</A></B>()</CODE><BR> Returns the horizontal position of the label's text, relative to its image.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/Icon.html">Icon</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JLabel.html#getIcon()">getIcon</A></B>()</CODE><BR> Returns the graphic image (glyph, icon) that the label displays.</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/JLabel.html#getIconTextGap()">getIconTextGap</A></B>()</CODE><BR> Returns the amount of space between the text and the icon displayed in this label.</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/JLabel.html#getLabelFor()">getLabelFor</A></B>()</CODE><BR> Get the component this is labelling.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JLabel.html#getText()">getText</A></B>()</CODE><BR> Returns the text string that the label displays.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/plaf/LabelUI.html">LabelUI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JLabel.html#getUI()">getUI</A></B>()</CODE><BR> Returns the L&F object that renders this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JLabel.html#getUIClassID()">getUIClassID</A></B>()</CODE><BR> Returns a string that specifies the name of the l&f class that renders this component.</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/JLabel.html#getVerticalAlignment()">getVerticalAlignment</A></B>()</CODE><BR> Returns the alignment of the label's contents along the Y axis.</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/JLabel.html#getVerticalTextPosition()">getVerticalTextPosition</A></B>()</CODE><BR> Returns the vertical position of the label's text, relative to its image.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JLabel.html#imageUpdate(java.awt.Image, int, int, int, int, int)">imageUpdate</A></B>(<A HREF="../../java/awt/Image.html">Image</A> img, int infoflags, int x, int y, int w, int h)</CODE><BR> This is overriden to return false if the current Icon's Image is not equal to the passed in Image <code>img</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JLabel.html#paramString()">paramString</A></B>()</CODE><BR> Returns a string representation of this JLabel.</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/JLabel.html#setDisabledIcon(javax.swing.Icon)">setDisabledIcon</A></B>(<A HREF="../../javax/swing/Icon.html">Icon</A> disabledIcon)</CODE><BR> Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).</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/JLabel.html#setDisplayedMnemonic(char)">setDisplayedMnemonic</A></B>(char aChar)</CODE><BR> Specifies the displayedMnemonic as a char value.</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/JLabel.html#setDisplayedMnemonic(int)">setDisplayedMnemonic</A></B>(int key)</CODE><BR> Specify a keycode that indicates a mnemonic key.</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/JLabel.html#setHorizontalAlignment(int)">setHorizontalAlignment</A></B>(int alignment)</CODE><BR> Sets the alignment of the label's contents along the X axis.</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/JLabel.html#setHorizontalTextPosition(int)">setHorizontalTextPosition</A></B>(int textPosition)</CODE><BR> Sets the horizontal position of the label's text, relative to its image.</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/JLabel.html#setIcon(javax.swing.Icon)">setIcon</A></B>(<A HREF="../../javax/swing/Icon.html">Icon</A> icon)</CODE><BR> Defines the icon this component will display.</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/JLabel.html#setIconTextGap(int)">setIconTextGap</A></B>(int iconTextGap)</CODE><BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -