WTKXSerializer wtkxSerializer = new WTKXSerializer();
window = (Window)wtkxSerializer.readObject(this, "radio_buttons.wtkx");
selectButton = (PushButton)wtkxSerializer.get("selectButton");
// Get a reference to the button group
final ButtonGroup numbersGroup = (ButtonGroup)wtkxSerializer.get("numbers");
// Add a button press listener
selectButton.getButtonPressListeners().add(new ButtonPressListener() {
@Override
public void buttonPressed(Button button) {
String message = "You selected \""
+ numbersGroup.getSelection().getButtonData()
+ "\".";
Alert.alert(MessageType.INFO, message, window);
}
});