X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemoApplication.java;h=3e4cbe92d56bcde373a7c6ec1d05e2327e86c0b1;hb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;hp=18d47f37e5a348002ecadd2df9e2755d7b920769;hpb=a69ed767c9c07cf35cf1c5f7821fc009cfe79cd2;p=nikiroo-utils.git diff --git a/src/jexer/demos/DemoApplication.java b/src/jexer/demos/DemoApplication.java index 18d47f3..3e4cbe9 100644 --- a/src/jexer/demos/DemoApplication.java +++ b/src/jexer/demos/DemoApplication.java @@ -55,7 +55,7 @@ public class DemoApplication extends TApplication { /** * Translated strings. */ - private static ResourceBundle i18n = ResourceBundle.getBundle(DemoApplication.class.getName()); + private static final ResourceBundle i18n = ResourceBundle.getBundle(DemoApplication.class.getName()); // ------------------------------------------------------------------------ // Constructors ----------------------------------------------------------- @@ -135,7 +135,10 @@ public class DemoApplication extends TApplication { * @throws Exception if TApplication can't instantiate the Backend. */ public DemoApplication(final BackendType backendType) throws Exception { - super(backendType); + // For the Swing demo, use an initial size of 82x28 so that a + // terminal window precisely fits the window. + super(backendType, (backendType == BackendType.SWING ? 82 : -1), + (backendType == BackendType.SWING ? 28 : -1), 20); addAllWidgets(); getBackend().setTitle(i18n.getString("applicationTitle")); } @@ -203,6 +206,7 @@ public class DemoApplication extends TApplication { new DemoMainWindow(this); // Add the menus + addToolMenu(); addFileMenu(); addEditMenu(); @@ -235,6 +239,7 @@ public class DemoApplication extends TApplication { item = swingMenu.addItem(3001, i18n.getString("smaller")); } + addTableMenu(); addWindowMenu(); addHelpMenu(); }