animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
  public void run(String[] args) {    if (args.length > 1) {      usage(getClass().getName());    }    if (args.length == 1) {      if (args[0].equals("-slow")) {        vboEnabled = false;      } else {        usage(getClass().getName());      }    }    setFlag(' ', true);   // animation on    setFlag('i', true);   // infinite viewer and light    canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());    //    canvas.setGL(new TraceGL(canvas.getGL(), System.err));    //    canvas.setGL(new DebugGL(canvas.getGL()));    VBOListener listener = new VBOListener();    canvas.addGLEventListener(listener);    animator = new Animator(canvas);    Frame frame = new Frame("Very Simple NV_vertex_array_range demo");    frame.setLayout(new BorderLayout());    canvas.setSize(800, 800);    frame.add(canvas, BorderLayout.CENTER);    frame.pack();    frame.show();    canvas.requestFocus();    frame.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          animator.stop();          System.exit(0);        }      });    animator.start();  }