animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
  public static void main(String[] argv)  {        Frame frame = new Frame("NVidia Cg Toolkit \"cgGL_vertex_example\" demo");    GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());    canvas.addGLEventListener(new cgGL_vertex_example());    frame.add(canvas);    frame.setSize(500, 500);    final Animator animator = new Animator(canvas);    frame.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          animator.stop();          System.exit(0);        }      });    frame.show();    animator.start();  }