HELLO WORLD...
[nikiroo-utils.git] / demos / Demo1.java
index 94f0e9f22ce2ebfdc1cc63593adcb50075b372c7..62fce24c3022bb46560a067d4f56bba97319cd8d 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA
  */
+
+import jexer.bits.*;
 import jexer.TApplication;
+import jexer.session.TTYSessionInfo;
 
 /**
  * The demo application itself.
  */
 class DemoApplication extends TApplication {
+    /**
+     * Public constructor
+     */
+    public DemoApplication() throws Exception {
+       super(null, null);
+       /*
+       try {
+           ColorTheme theme = new ColorTheme();
+           TTYSessionInfo tty = new TTYSessionInfo();
+           System.out.println("width: " + tty.getWindowWidth());
+           System.out.println("height: " + tty.getWindowHeight());
+       } catch (Exception e) {
+           e.printStackTrace();
+       }
+        */
+    }
 }
 
 /**
@@ -48,8 +67,12 @@ public class Demo1 {
      * @param  args Command line arguments
      */
     public static void main(String [] args) {
-       DemoApplication app = new DemoApplication();
-       app.run();
+       try {
+           DemoApplication app = new DemoApplication();
+           app.run();
+       } catch (Exception e) {
+           e.printStackTrace();
+       }
     }
 
 }