More PMD warnings
[fanfix.git] / src / jexer / demos / DemoTextFieldWindow.java
index fcdf4615cefe4fccf0b63d49d02fceac26374a5c..2d9c5048c46b3df1a4cb2fea5a8f03b1085c6cc8 100644 (file)
@@ -37,6 +37,10 @@ import static jexer.TKeypress.*;
  */
 public class DemoTextFieldWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Constructor.
      *
@@ -67,6 +71,9 @@ public class DemoTextFieldWindow extends TWindow {
         addPasswordField(35, row++, 15, false);
         addLabel("Fixed-width password:", 1, row);
         addPasswordField(35, row++, 15, true, "hunter2");
+        addLabel("Very long text field:", 1, row);
+        TField selected = addField(35, row++, 40, false,
+            "Very very long field text that should be outside the window");
         row += 1;
 
         addButton("&Close Window", (getWidth() - 14) / 2, getHeight() - 4,
@@ -77,10 +84,13 @@ public class DemoTextFieldWindow extends TWindow {
             }
         );
 
+        activate(selected);
+
         statusBar = newStatusBar("Text fields");
         statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
         statusBar.addShortcutKeypress(kbF2, cmShell, "Shell");
         statusBar.addShortcutKeypress(kbF3, cmOpen, "Open");
         statusBar.addShortcutKeypress(kbF10, cmExit, "Exit");
     }
+
 }