import java.awt.*; import java.awt.event.*; import net.java.games.jogl.*; public class AnimJOGLApp { static Animator animator; public static void main(String[] args) { Frame frame = new Frame("AnimJOGLApp"); //Animator für Bewegung //GLCanvas für Anzeige GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new AnimGLEventListener()); frame.add(canvas); //Animator mit Zeichenfläche initialisieren animator = new Animator(canvas); frame.setSize( 400, 400); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { animator.stop(); System.exit(0); } }); frame.setVisible(true); //Animation starten animator.start(); } }