charvax.swing
Class JButton
- EventListener, ItemSelectable, KeyListener
An implementation of a "pushbutton" with a text label.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
JButton() - Default constructor - construct a button with an empty label.
|
JButton(String text_)
|
addActionListener , addItemListener , doClick , fireActionPerformed , fireItemStateChanged , getActionCommand , getLabel , getLabelString , getMnemonic , getText , isSelected , keyPressed , keyReleased , keyTyped , processEvent , processMouseEvent , removeItemListener , setActionCommand , setLabel , setMnemonic , setSelected , setText |
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 , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
JButton
public JButton()
Default constructor - construct a button with an empty label.
JButton
public JButton(String text_)
draw
public void draw()
Draw the button. Called by this JButton's parent container.
- draw in interface JComponent
getSize
public Dimension getSize()
Return the size of the button. The button is always one line
high, and two columns wider than the label, plus the size
of the border (if any).
- getSize in interface Component
processKeyEvent
public void processKeyEvent(KeyEvent ke_)
Processes key events occurring on this object by dispatching them
to any registered KeyListener objects.
- processKeyEvent in interface Component
setLabel
public void setLabel(String label_)
Replaced by setText(String text)
- setLabel in interface AbstractButton
toString
public String toString()