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™
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.
104 *
105 * @author Hans Muller
106 */
107 @SuppressWarnings("serial")
108 public class JLabel extends JComponent implements SwingConstants, Accessible
109 {
110 /**
111 * @see #getUIClassID
112 * @see #readObject
113 */
114 private static final String uiClassID = "LabelUI";
115
116 private int mnemonic = '\0';
117 private int mnemonicIndex = -1;
118
119 private String text = ""; // "" rather than null, for BeanBox
120 private Icon defaultIcon = null;
121 private Icon disabledIcon = null;
122 private boolean disabledIconSet = false;
123
124 private int verticalAlignment = CENTER;
125 private int horizontalAlignment = LEADING;
|
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™
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.
104 *
105 * @author Hans Muller
106 * @since 1.2
107 */
108 @SuppressWarnings("serial")
109 public class JLabel extends JComponent implements SwingConstants, Accessible
110 {
111 /**
112 * @see #getUIClassID
113 * @see #readObject
114 */
115 private static final String uiClassID = "LabelUI";
116
117 private int mnemonic = '\0';
118 private int mnemonicIndex = -1;
119
120 private String text = ""; // "" rather than null, for BeanBox
121 private Icon defaultIcon = null;
122 private Icon disabledIcon = null;
123 private boolean disabledIconSet = false;
124
125 private int verticalAlignment = CENTER;
126 private int horizontalAlignment = LEADING;
|