canvas = GLDrawableFactory.getFactory().createGLCanvas(caps);
canvas = new GLCanvas(caps);
  public void run(String[] args) {    GLCapabilities caps = new GLCapabilities();    GLCapabilitiesChooser chooser = new MultisampleChooser();    caps.setSampleBuffers(true);    caps.setNumSamples(4);    canvas = GLDrawableFactory.getFactory().createGLCanvas(caps, chooser, null, null);    canvas.addGLEventListener(new Listener());        Frame frame = new Frame("Full-scene antialiasing");    frame.setLayout(new BorderLayout());    canvas.setSize(512, 512);    frame.add(canvas, BorderLayout.CENTER);    frame.pack();    frame.show();    frame.setLocation(0, 0);    canvas.requestFocus();    frame.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          runExit();        }      });    // No antialiasing (for comparison)    caps.setSampleBuffers(false);    canvas = GLDrawableFactory.getFactory().createGLCanvas(caps);    canvas.addGLEventListener(new Listener());        frame = new Frame("No antialiasing");    frame.setLayout(new BorderLayout());    canvas.setSize(512, 512);    frame.add(canvas, BorderLayout.CENTER);    frame.pack();    frame.show();    frame.setLocation(512, 0);    canvas.requestFocus();    frame.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          runExit();        }      });  }