Add 'src/jexer/' from commit 'cf01c92f5809a0732409e280fb0f32f27393618d'
[nikiroo-utils.git] / src / jexer / demos / DemoApplication.java
index 85057037ec188e65184debba167945f5dc0a4d0a..3e4cbe92d56bcde373a7c6ec1d05e2327e86c0b1 100644 (file)
@@ -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"));
     }