animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
    public static void main(String[] args) {        try {            Frame frame = new Frame("Tess Demo");            frame.setSize(500, 500);            GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());            frame.add(canvas);            canvas.addGLEventListener(new TessRenderer());            final Animator animator = new Animator(canvas);            frame.addWindowListener(new WindowAdapter() {                public void windowClosing(WindowEvent e) {                    animator.stop();                    System.exit(0);                }            });            frame.show();            animator.start();        } catch (Exception e) {            e.printStackTrace();        }    }