gamePanel() throws IOException {

        //normal size 1600X900
        //load all the images
        imgURL = getClass().getResource("titlePage.png");
        startScreen = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(startScreen, 0);

        imgURL = getClass().getResource("backgroundImage.png");
        backgroundImage = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(backgroundImage, 0);

        imgURL = getClass().getResource("levelComplete.png");
        levelComplete = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(levelComplete, 0);

        imgURL = getClass().getResource("levelFailed.png");
        levelFailed = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(levelFailed, 0);

        imgURL = getClass().getResource("gameover.png");
        gameover = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(gameover, 0);

        imgURL = getClass().getResource("paused.png");
        paused = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(paused, 0);

        imgURL = getClass().getResource("Instructions.png");
        instructionsScreen = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(instructionsScreen, 0);

        imgURL = getClass().getResource("highScores.png");
        highScoreScreen = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(highScoreScreen, 0);

        imgURL = getClass().getResource("loosingPage.png");
        loosingScreen = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(loosingScreen, 0);

        imgURL = getClass().getResource("X.png");
        blackX = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(blackX, 0);

        imgURL = getClass().getResource("redX.png");
        redX = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(redX, 0);

        imgURL = getClass().getResource("tankBase.png");
        tankBase = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(tankBase, 0);

        imgURL = getClass().getResource("enemyTankBase.png");
        enemyTankBase = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(enemyTankBase, 0);

        imgURL = getClass().getResource("bulletBillA.png");
        bulletBillA = Toolkit.getDefaultToolkit().getImage(imgURL);
        mediaTracker.addImage(bulletBillA, 0);

        imgURL = getClass().getResource("brick.png");
        brick = ImageIO.read(imgURL);
        mediaTracker.addImage(brick, 0);

        imgURL = this.getClass().getResource("goldBulletBill.png");
        bullet = ImageIO.read(imgURL);
        mediaTracker.addImage(bullet, 0);

        //wait for them to load
        try {
            mediaTracker.waitForID(0);
        } catch (InterruptedException ex) {
            Logger.getLogger(gamePanel.class.getName()).log(Level.SEVERE, null, ex);
        }

        //store width and heigh of background
        width = backgroundImage.getWidth(this);
        height = backgroundImage.getHeight(this);

        //add mouse and keyboard inputs
        addKeyListener(
                this);
        addMouseMotionListener(
                this);
        addMouseListener(
                this);

        //set the side of the panel to the background size
        setSize(width, height);

        //set it to visible
        setVisible(
                true);
        //get focouse
        setFocusable(
                true);
        requestFocus();
    }