#19 TField fixes
[fanfix.git] / src / jexer / demos / DemoTextFieldWindow.java
index cd989b8c4e70e26e6d68300ebe1d7b9a114c4518..51656ba7f4e964bbb61ff4af365eeaba67d7d7b5 100644 (file)
@@ -3,7 +3,7 @@
  *
  * The MIT License (MIT)
  *
- * Copyright (C) 2016 Kevin Lamonte
+ * Copyright (C) 2017 Kevin Lamonte
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -67,6 +67,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,6 +80,8 @@ public class DemoTextFieldWindow extends TWindow {
             }
         );
 
+        activate(selected);
+
         statusBar = newStatusBar("Text fields");
         statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
         statusBar.addShortcutKeypress(kbF2, cmShell, "Shell");