GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
GLCanvas canvas = new GLCanvas();
  public static void main(String[] args) {    Frame frame = new Frame("Gear Demo");    GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());    canvas.addGLEventListener(new Gears());    frame.add(canvas);    frame.setSize(300, 300);    final Animator animator = new Animator(canvas);    frame.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          // Run this on another thread than the AWT event queue to          // make sure the call to Animator.stop() completes before          // exiting          new Thread(new Runnable() {              public void run() {                animator.stop();                System.exit(0);              }            }).start();        }      });    frame.show();    animator.start();  }