001package cnslab.gui; 002import jpvm.*; 003import thinlet.*; 004 005/* 006 * Demonstrate: 007 * a panel, buttons and a textfield 008 */ 009public class Example1 extends Thinlet { 010 public Example1() throws Exception { 011 add(parse("cal.xml")); 012 } 013 014 public void display(Object button, Object result) { 015 String s = getString(result, "text"); 016 String t = getString(button, "name"); 017 setString(result, "text", s+t); 018 } 019 020 public void clear(Object result) { 021 setString(result, "text", ""); 022 } 023 024 public static void main(String[] args) throws jpvmException,Exception { 025// new FrameLauncher("Calculator", new Example1(), 100, 140); 026 System.out.println("here"); 027 GConsole g= new GConsole(); 028 if(g.testDaemon()) 029 { 030 System.out.println("Server okay"); 031 g.Delete(); 032 System.out.println(g.Ps()); 033 } 034 else 035 { 036 System.out.println("Server down"); 037 } 038 } 039}