javax.swing

Class JCheckBox

public class JCheckBox extends JToggleButton implements Accessible

A small box that displays a check or not, depending on it's selected state. This works very similar to {@link JToggleButton} and {@link JRadioButton}, but in UI design it has different semantics. JCheckBoxes are usually used in multiple-choice scenarios, where a user can select 0..n of n different options. (This is in contrast to the general RadioButton semantics where the user can select exactly one of n options). Note however that this semantics is in no way enforced by the JCheckBox.
Nested Class Summary
protected classJCheckBox.AccessibleJCheckBox
Provides accessibility support for JCheckBox.
Field Summary
static StringBORDER_PAINTED_FLAT_CHANGED_PROPERTY
Constructor Summary
JCheckBox()
JCheckBox(Action action)
JCheckBox(Icon icon)
JCheckBox(Icon icon, boolean selected)
JCheckBox(String text)
JCheckBox(String text, boolean selected)
JCheckBox(String text, Icon icon)
JCheckBox(String text, Icon icon, boolean selected)
Method Summary
AccessibleContextgetAccessibleContext()
Returns the accessible context for this JCheckBox.
StringgetUIClassID()
Returns a string that specifies the name of the Look and Feel class that renders this component.
booleanisBorderPaintedFlat()
protected StringparamString()
voidsetBorderPaintedFlat(boolean newValue)

Field Detail

BORDER_PAINTED_FLAT_CHANGED_PROPERTY

public static final String BORDER_PAINTED_FLAT_CHANGED_PROPERTY

Constructor Detail

JCheckBox

public JCheckBox()

JCheckBox

public JCheckBox(Action action)

JCheckBox

public JCheckBox(Icon icon)

JCheckBox

public JCheckBox(Icon icon, boolean selected)

JCheckBox

public JCheckBox(String text)

JCheckBox

public JCheckBox(String text, boolean selected)

JCheckBox

public JCheckBox(String text, Icon icon)

JCheckBox

public JCheckBox(String text, Icon icon, boolean selected)

Method Detail

getAccessibleContext

public AccessibleContext getAccessibleContext()
Returns the accessible context for this JCheckBox.

Returns: the accessible context for this JCheckBox

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the Look and Feel class that renders this component.

isBorderPaintedFlat

public boolean isBorderPaintedFlat()

paramString

protected String paramString()

setBorderPaintedFlat

public void setBorderPaintedFlat(boolean newValue)