animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
  public static void main(String[] args) {    Frame frame = new Frame("Gear Demo");    GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());    // Use debug pipeline    //    canvas.setGL(new DebugGL(canvas.getGL()));    System.err.println("CANVAS GL IS: " + canvas.getGL().getClass().getName());    System.err.println("CANVAS GLU IS: " + canvas.getGLU().getClass().getName());    canvas.addGLEventListener(new GearRenderer());    frame.add(canvas);    frame.setSize(300, 300);    final Animator animator = new Animator(canvas);    frame.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          animator.stop();          System.exit(0);        }      });    frame.show();    animator.start();  }