charvax.swing
Class JLabel
A display area for a short text string. A label cannot react to keyboard
events and cannot receive the keyboard focus.
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT, _alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible |
JLabel()- Construct an empty label.
|
JLabel(String text_)- Construct a JLabel with the specified text.
|
JLabel(String text_, int align_)- Use this constructor if you want to set the alignment to something
other than left-aligned.
|
addFocusListener, addKeyListener, contains, contains, debug, draw, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getHeight, getLocation, getLocationOnScreen, getName, getParent, getSize, getWidth, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, minimumSize, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, repaint, requestFocus, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor |
JLabel
public JLabel()
Construct an empty label.
JLabel
public JLabel(String text_)
Construct a JLabel with the specified text.
JLabel
public JLabel(String text_,
int align_) Use this constructor if you want to set the alignment to something
other than left-aligned.
getText
public String getText()
isFocusTraversable
public boolean isFocusTraversable()
This component will not receive focus when Tab or Shift-Tab is pressed.
- isFocusTraversable in interface Component
processKeyEvent
public void processKeyEvent(KeyEvent ke_)
The JLabel class ignores key events. A JLabel should never
have input focus anyway.
- processKeyEvent in interface Component
requestFocus
public void requestFocus()
The JLabel component never gets the keyboard input focus.
- requestFocus in interface Component
setLength
public void setLength(int length_)
setText
public void setText(String label_)
toString
public String toString()