intellij-randomness / com.fwdekker.randomness.ui / javax.swing.ButtonGroup

Extensions for javax.swing.ButtonGroup

forEach

fun ButtonGroup.forEach(consumer: (AbstractButton) -> Unit): Unit

Executes a consumer for each button in a group.

getValue

fun ButtonGroup.getValue(): String?

Returns the action command of the currently selected button, or null if no button is selected.

setValue

fun ButtonGroup.setValue(value: Any?): Unit

Sets the currently selected button to the button with the given action command.