Merge commit '77d3a60869e7a780c6ae069e51530e1eacece5e2'
[fanfix.git] / src / jexer / demos / DemoCheckBoxWindow.java
index c982244f9d2e5ad1bf68ef36ce552a6262169dff..faf3530cd47e86da9fac5103aac5e7dd6303dcba 100644 (file)
@@ -39,6 +39,7 @@ import jexer.TComboBox;
 import jexer.TMessageBox;
 import jexer.TRadioGroup;
 import jexer.TWindow;
+import jexer.layout.StretchLayoutManager;
 import static jexer.TCommand.*;
 import static jexer.TKeypress.*;
 
@@ -87,6 +88,9 @@ public class DemoCheckBoxWindow extends TWindow {
         // centered on screen.
         super(parent, i18n.getString("windowTitle"), 0, 0, 60, 17, flags);
 
+        setLayoutManager(new StretchLayoutManager(getWidth() - 2,
+                getHeight() - 2));
+
         int row = 1;
 
         // Add some widgets
@@ -99,8 +103,9 @@ public class DemoCheckBoxWindow extends TWindow {
         TRadioGroup group = addRadioGroup(1, row,
             i18n.getString("radioGroupTitle"));
         group.addRadioButton(i18n.getString("radioOption1"));
-        group.addRadioButton(i18n.getString("radioOption2"));
+        group.addRadioButton(i18n.getString("radioOption2"), true);
         group.addRadioButton(i18n.getString("radioOption3"));
+        group.setRequiresSelection(true);
 
         List<String> comboValues = new ArrayList<String>();
         comboValues.add(i18n.getString("comboBoxString0"));