First, you need to check the value of the radio button that has been selected: You can either use:
getText()
or isSelected()
.
Then, depending on which one was selected, you can set the text of the edit box. However, you need to get the value of the text field first.
You can use:
textField.getText();
Then you can parse it into an int using:
Integer.parseInt(textField.getText());
Finally, you want to divide it by 60 and get the remainder of the divison:
int hours = Integer.parseInt(textField.getText()) / 60;
int minutes = Integer.parseInt(textField.getText()) % 60;
You will also need to set the textfield to that new value:
textField.setText(hours + ":" + minutes);