public void createWindow() {
        Frame window = new Frame(this.title);
        
        final Game game = this;
        window.addWindowListener(new WindowListener() {
            @Override
            public void windowClosing(WindowEvent e) {
                game.stop();
                System.exit(0);
            }
            @Override
            public void windowOpened(WindowEvent e) {}
            @Override
            public void windowClosed(WindowEvent e) {}
            @Override
            public void windowIconified(WindowEvent e) {}
            @Override
            public void windowDeiconified(WindowEvent e) {}
            @Override
            public void windowActivated(WindowEvent e) {}
            @Override
            public void windowDeactivated(WindowEvent e) {}
        });
        
        initLog4J();
        
        this.init();
        window.add(canvas);
        
        if(icon != null && icon != "") {
            try {
                window.setIconImage(ImageIO.read(Game.class.getResourceAsStream(icon)));
            } catch (IOException e) {
                logger.error("Could not load icon image", e);
            }
        }

        window.setLocationRelativeTo(null);
        window.setResizable(false);
        window.pack();
        window.setVisible(true);
    }