JTerminal documentation Help

RadioButton

The RadioButton works similar to CheckBox but has a different design and can only be selected individually within a component group.

RadioButtonComponent radioButtonComponent = new RadioButtonComponent("RB 1"); RadioButtonComponent radioButtonComponent2 = new RadioButtonComponent("RB 2"); RadioButtonComponent radioButtonComponent3 = new RadioButtonComponent("RB 3"); radioButtonComponent.checked(true); ComponentGroup group = new ComponentGroup(); group.add(radioButtonComponent, radioButtonComponent2, radioButtonComponent3);
radiobutton example

Methods

Method

Description

void text(String)

Sets the display text

String text()

Returns the display text

int preferredWidth()

Returns the preferred width

void checked(boolean)

Sets the current status

boolean checked()

Returns the current status

Events

Event

Description

RadioButtonChangeEvent

Event on change of status

Last modified: 01 Juni 2025