+ /**
+ * Get the radio button that was selected.
+ *
+ * @return the selected button, or null if no button is selected
+ */
+ public TRadioButton getSelectedButton() {
+ return selectedButton;
+ }
+
+ /**
+ * Convenience function to add a radio button to this group.
+ *
+ * @param label label to display next to (right of) the radiobutton
+ * @param selected if true, this will be the selected radiobutton
+ * @return the new radio button
+ */
+ public TRadioButton addRadioButton(final String label,
+ final boolean selected) {
+
+ TRadioButton button = addRadioButton(label);
+ setSelected(button.id);
+ return button;
+ }
+