src/share/classes/javax/swing/JLabel.java

Print this page




  63  * in their display area.
  64  * Text-only labels are leading edge aligned, by default;
  65  * image-only labels are horizontally centered, by default.
  66  * <p>
  67  * You can also specify the position of the text
  68  * relative to the image.
  69  * By default, text is on the trailing edge of the image,
  70  * with the text and image vertically aligned.
  71  * <p>
  72  * A label's leading and trailing edge are determined from the value of its
  73  * {@link java.awt.ComponentOrientation} property.  At present, the default
  74  * ComponentOrientation setting maps the leading edge to left and the trailing
  75  * edge to right.
  76  *
  77  * <p>
  78  * Finally, you can use the <code>setIconTextGap</code> method
  79  * to specify how many pixels
  80  * should appear between the text and the image.
  81  * The default is 4 pixels.
  82  * <p>
  83  * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/label.html">How to Use Labels</a>
  84  * in <em>The Java Tutorial</em>
  85  * for further documentation.
  86  * <p>
  87  * <strong>Warning:</strong> Swing is not thread safe. For more
  88  * information see <a
  89  * href="package-summary.html#threading">Swing's Threading
  90  * Policy</a>.
  91  * <p>
  92  * <strong>Warning:</strong>
  93  * Serialized objects of this class will not be compatible with
  94  * future Swing releases. The current serialization support is
  95  * appropriate for short term storage or RMI between applications running
  96  * the same version of Swing.  As of 1.4, support for long term storage
  97  * of all JavaBeans<sup><font size="-2">TM</font></sup>
  98  * has been added to the <code>java.beans</code> package.
  99  * Please see {@link java.beans.XMLEncoder}.
 100  *
 101  * @beaninfo
 102  *   attribute: isContainer false
 103  * description: A component that displays a short string and an icon.




  63  * in their display area.
  64  * Text-only labels are leading edge aligned, by default;
  65  * image-only labels are horizontally centered, by default.
  66  * <p>
  67  * You can also specify the position of the text
  68  * relative to the image.
  69  * By default, text is on the trailing edge of the image,
  70  * with the text and image vertically aligned.
  71  * <p>
  72  * A label's leading and trailing edge are determined from the value of its
  73  * {@link java.awt.ComponentOrientation} property.  At present, the default
  74  * ComponentOrientation setting maps the leading edge to left and the trailing
  75  * edge to right.
  76  *
  77  * <p>
  78  * Finally, you can use the <code>setIconTextGap</code> method
  79  * to specify how many pixels
  80  * should appear between the text and the image.
  81  * The default is 4 pixels.
  82  * <p>
  83  * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/label.html">How to Use Labels</a>
  84  * in <em>The Java Tutorial</em>
  85  * for further documentation.
  86  * <p>
  87  * <strong>Warning:</strong> Swing is not thread safe. For more
  88  * information see <a
  89  * href="package-summary.html#threading">Swing's Threading
  90  * Policy</a>.
  91  * <p>
  92  * <strong>Warning:</strong>
  93  * Serialized objects of this class will not be compatible with
  94  * future Swing releases. The current serialization support is
  95  * appropriate for short term storage or RMI between applications running
  96  * the same version of Swing.  As of 1.4, support for long term storage
  97  * of all JavaBeans<sup><font size="-2">TM</font></sup>
  98  * has been added to the <code>java.beans</code> package.
  99  * Please see {@link java.beans.XMLEncoder}.
 100  *
 101  * @beaninfo
 102  *   attribute: isContainer false
 103  * description: A component that displays a short string and an icon.