public class JCheckBox extends AbstractButton
_actionListeners, _itemListeners_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 |
|---|
JCheckBox()
The default constructor creates a deselected checkbox with an
empty label.
|
JCheckBox(java.lang.String text_)
Use this constructor when you want to initialize the label.
|
JCheckBox(java.lang.String label_,
boolean value_)
Use this constructor when you want to set both the label and the value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(int level_) |
void |
draw()
Called by this JCheckBox's parent container.
|
int |
getHeight() |
Dimension |
getSize()
Return the size of the text field.
|
int |
getWidth() |
Dimension |
minimumSize()
Called by the LayoutManager.
|
void |
processKeyEvent(KeyEvent ke_)
Invoke all the KeyListener callbacks that may have been registered
for this component.
|
void |
requestFocus()
This method should be invoked by all subclasses of Component
which override this method; because this method generates the
FOCUS_GAINED event when the component gains the keyboard focus.
|
java.lang.String |
toString() |
addActionListener, addItemListener, addKeyListenerToAncestor, doClick, fireActionPerformed, fireItemStateChanged, getActionCommand, getLabel, getLabelString, getMnemonic, getText, isSelected, keyPressed, keyReleased, keyTyped, processEvent, processMouseEvent, removeItemListener, setActionCommand, setLabel, setMnemonic, setParent, setSelected, setTextgetBorder, getInsets, setBorderaddFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isRecursivelyVisible, isTotallyObscured, isValid, isVisible, processFocusEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setVisible, show, validate, validateCursesColorpublic JCheckBox()
public JCheckBox(java.lang.String text_)
public JCheckBox(java.lang.String label_,
boolean value_)
public Dimension getSize()
public Dimension minimumSize()
minimumSize in class Componentpublic void draw()
draw in class JComponentpublic void processKeyEvent(KeyEvent ke_)
ComponentprocessKeyEvent in class Componentpublic void requestFocus()
ComponentrequestFocus in class Componentpublic java.lang.String toString()
toString in class java.lang.Object