public Teste() { super("colormatrix"); caps = new GLCapabilities(); canvas = new GLCanvas(caps); canvas.addGLEventListener(this); canvas.addKeyListener(this); add(canvas); }
public void run() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(640, 480); setLocationRelativeTo(null); setVisible(true); canvas.requestFocusInWindow(); }