# CheckBoxHandle

Import: `import com.install4j.api.test.formcomponents.CheckBoxHandle;`

```java
interface CheckBoxHandle extends FormComponentHandle
```

Handle for the "Check box" form component. The Swing widget is a `JCheckBox`.

Reach this handle via [`ScreenHandle.checkBox`](../ui/ScreenHandle.md#checkbox).

## Inherited from

- [FormComponentHandle](FormComponentHandle.md) — 7 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`isSelected()`](#isselected) | `boolean` | Whether the checkbox is currently selected. |
| [`setSelected(boolean)`](#setselected-boolean) | `CheckBoxHandle` | Set the checkbox's selected state. |
| [`toggle()`](#toggle) | `CheckBoxHandle` | Flip the checkbox's selected state. |
| [`assertSelected()`](#assertselected) | `CheckBoxHandle` | Assert that the checkbox is currently selected. |
| [`assertNotSelected()`](#assertnotselected) | `CheckBoxHandle` | Assert that the checkbox is not currently selected. |
| [`assertEnabled()`](#assertenabled) | `CheckBoxHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `CheckBoxHandle` |  |
| [`assertVisible()`](#assertvisible) | `CheckBoxHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `CheckBoxHandle` |  |

### isSelected()

```java
boolean isSelected()
```

Whether the checkbox is currently selected.

### setSelected(boolean)

```java
CheckBoxHandle setSelected(boolean selected)
```

Set the checkbox's selected state.

### toggle()

```java
CheckBoxHandle toggle()
```

Flip the checkbox's selected state.

### assertSelected()

```java
CheckBoxHandle assertSelected()
```

Assert that the checkbox is currently selected.

### assertNotSelected()

```java
CheckBoxHandle assertNotSelected()
```

Assert that the checkbox is not currently selected.

### assertEnabled()

```java
CheckBoxHandle assertEnabled()
```

### assertDisabled()

```java
CheckBoxHandle assertDisabled()
```

### assertVisible()

```java
CheckBoxHandle assertVisible()
```

### assertInvisible()

```java
CheckBoxHandle assertInvisible()
```

