X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemoCheckBoxWindow.java;h=faf3530cd47e86da9fac5103aac5e7dd6303dcba;hb=505be508ae7d3fb48122be548b310a238cfb91eb;hp=c982244f9d2e5ad1bf68ef36ce552a6262169dff;hpb=a69ed767c9c07cf35cf1c5f7821fc009cfe79cd2;p=fanfix.git diff --git a/src/jexer/demos/DemoCheckBoxWindow.java b/src/jexer/demos/DemoCheckBoxWindow.java index c982244..faf3530 100644 --- a/src/jexer/demos/DemoCheckBoxWindow.java +++ b/src/jexer/demos/DemoCheckBoxWindow.java @@ -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 comboValues = new ArrayList(); comboValues.add(i18n.getString("comboBoxString0"));