Example #1
0
  public Teste() {
    super("colormatrix");

    caps = new GLCapabilities();
    canvas = new GLCanvas(caps);
    canvas.addGLEventListener(this);
    canvas.addKeyListener(this);

    add(canvas);
  }
Example #2
0
 public void run() {
   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   setSize(640, 480);
   setLocationRelativeTo(null);
   setVisible(true);
   canvas.requestFocusInWindow();
 }