Example usage for Java java.awt Label fields, constructors, methods, implement or subclass
The text is from its open source code.
int | LEFT Indicates that the label should be left justified. |
int | CENTER Indicates that the label should be centered. |
int | RIGHT Indicates that the label should be right justified. |
Label(String text) Constructs a new label with the specified string of text, left justified. | |
Label(String text, int alignment) Constructs a new label that presents the specified string of text with the specified alignment. | |
Label() Constructs an empty label. |
String | getText() Gets the text of this label. |
void | hide() |
void | setAlignment(int alignment) Sets the alignment for this label to the specified alignment. |
void | setBackground(Color c) Sets the background color of this component. |
void | setFont(Font f) Sets the font of this component. |
void | setForeground(Color c) Sets the foreground color of this component. |
void | setSize(int width, int height) Resizes this component so that it has width width and height height . |
void | setText(String text) Sets the text for this label to the specified text. |
void | setVisible(boolean b) Shows or hides this component depending on the value of parameter b . |
void | show() |
Dimension | size() Returns the size of this component in the form of a Dimension object. |