Component | +--Control | +--Labelpublic class Label
Implements a simple static label control. Label controls are typically used to either display status text to the user or to identify the purpose of other controls that don't have an associated label. When a Label control gets the focus, it passes that focus to the next control in the tab order. This allows you to specify a mnemonic key for the label and have this key jump to other controls.
Constructors
Name | Description |
---|---|
Label() | Default constructor. |
Methods
Name | Description |
---|---|
getAlignment() | Retrieves the alignment mode of the label. |
getBorder() | Indicates whether the label has a visible border. |
getUseMnemonic() | Indicates whether the label interprets the first ampersand (&) character as a hotkey mnemonic. |
setAlignment(int alignment) | Sets the alignment mode for the label. |
setBorder(boolean border) | Determines whether this control has a visible border. |
setUseMnemonic(boolean useMnemonic) | Determines whether this control will use the first ampersand (&) in its text as a hotkey mnemonic. |
Default constructor.
Returns a HorizontalAlignment enum.
Retrieves the alignment mode of the label. This will be one of the HorizontalAlignment enum values.
Returns true if the label has a visible border; otherwise, returns false.
Indicates whether the label has a visible border.
Returns true if the label uses mnemonics defined in its text; otherwise, returns false.
Indicates whether the label interprets the first ampersand (&) character as a hotkey mnemonic.
Sets the alignment mode for the label.
Determines whether this control has a visible border.
Determines whether this control will use the first ampersand (&) in its text as a hotkey mnemonic.