@SuppressWarnings("LeakingThisInConstructor")
    public Game(long period) {
        super("Game");

        new RepeatingReleasedEventsFixer().install();

        this.setUndecorated(false);

        Thread.currentThread().setUncaughtExceptionHandler(new EIError());

        gp = new GamePanel(this, period, 800, 600);
        Container c = getContentPane();
        gp.setContainer(c);
        c.add(gp, "Center");

        addWindowListener(this);
        pack();
        setResizable(false);
        setVisible(true);

        //add the icon
        Image icon = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/Images/Misc/Icon.png"));
        if (icon != null) {
            setIconImage(icon);
        }

        setTitle("Epic Inventor - v" + VERSION);

        //center the frame
        this.setLocationRelativeTo(null);
    }