public class JLabel extends JComponent
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
_bold |
_border_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
JLabel()
Construct an empty label.
|
JLabel(java.lang.String text_)
Construct a JLabel with the specified text.
|
JLabel(java.lang.String text_,
int align_)
Use this constructor if you want to set the alignment to something
other than left-aligned.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(int level_) |
void |
draw()
Draws the border of the component (if there is one).
|
int |
getHeight() |
Dimension |
getSize()
This may be wrong, but it'll do for now.
|
java.lang.String |
getText() |
int |
getWidth() |
boolean |
isFocusTraversable()
This component will not receive focus when Tab or Shift-Tab is pressed.
|
Dimension |
minimumSize() |
void |
processKeyEvent(KeyEvent ke_)
The JLabel class ignores key events.
|
void |
requestFocus()
The JLabel component never gets the keyboard input focus.
|
void |
setFont(Font font_) |
void |
setLength(int length_) |
void |
setText(java.lang.String label_) |
java.lang.String |
toString() |
getBorder, getInsets, setBorderaddFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isRecursivelyVisible, isTotallyObscured, isValid, isVisible, processEvent, processFocusEvent, processMouseEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColorpublic JLabel()
public JLabel(java.lang.String text_)
public JLabel(java.lang.String text_,
int align_)
public void setLength(int length_)
public Dimension minimumSize()
minimumSize in class Componentpublic void draw()
JComponentdraw in class JComponentpublic Dimension getSize()
public void setText(java.lang.String label_)
public java.lang.String getText()
public boolean isFocusTraversable()
isFocusTraversable in class Componentpublic void processKeyEvent(KeyEvent ke_)
processKeyEvent in class Componentpublic void requestFocus()
requestFocus in class Componentpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setFont(Font font_)