import java.awt.*; import java.awt.event.*; import javax.media.opengl.*; import com.sun.opengl.util.Animator; public class SimuTank { public static void main(String[] args) { Frame frame = new Frame("Tanks"); GLCanvas canvas = new GLCanvas(); World monde = new World(); canvas.addGLEventListener(monde); canvas.addKeyListener(monde); frame.add(canvas); frame.setSize(300, 300); final Animator animator = new Animator(canvas); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { animator.stop(); System.exit(0); } }); frame.setVisible(true); animator.start(); } }