// Run the GUI codes in the event-dispatching thread for thread safety
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
//Create the OpenGL rendering canvas
GLCanvas canvas = new NormansAdventure();
canvas.setPreferredSize( new Dimension(CANVAS_WIDTH, CANVAS_HEIGHT));
// Create an animator that drives canvas' display() at the specified FPS
final FPSAnimator animator = new FPSAnimator(canvas, FPS, true);
//Create the top-level container