import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.swing.JFrame;

public class Test implements GLEventListener
{
	public void display(GLAutoDrawable drawable){}
	public void dispose(GLAutoDrawable drawable){}
	public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height){}
	
	public void init(GLAutoDrawable drawable)
	{
		System.out.println(drawable.getChosenGLCapabilities());
	}

	public static void main(String[] args)
	{
		GLCanvas canvas;
		GLCapabilities capabilities;
		JFrame frame;
		
		capabilities = new GLCapabilities(GLProfile.getDefault());
		capabilities.setSampleBuffers(true);
		capabilities.setNumSamples(2);
		
		canvas = new GLCanvas(capabilities);
		canvas.addGLEventListener(new Test());
		
		frame = new JFrame();
		frame.add(canvas);
		frame.setSize(100, 100);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
	}
}