// Constructors -----------------------------------------------------------
// ------------------------------------------------------------------------
+ /**
+ * Public constructor.
+ *
+ * @param parent parent widget
+ * @param x column relative to parent
+ * @param y row relative to parent
+ * @param width width of group
+ * @param label label to display on the group box
+ */
+ public TRadioGroup(final TWidget parent, final int x, final int y,
+ final int width, final String label) {
+
+ // Set parent and window
+ super(parent, x, y, width, 2);
+
+ this.label = label;
+ }
+
/**
* Public constructor.
*
public void setRequiresSelection(final boolean requiresSelection) {
this.requiresSelection = requiresSelection;
if (requiresSelection) {
- if (getChildren().size() > 0) {
+ if ((getChildren().size() > 0) && (selectedButton == null)) {
setSelected(1);
}
}