@Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
//------------------------------------------------------------------------------Painting the correct character        
        if (characterChosen == 1) {
            g.drawImage(hero.image, heroCurrentX, heroCurrentY, 50, 50, null);
        }
        if (characterChosen == 2) {
            g.drawImage(hero.image2, heroCurrentX, heroCurrentY, 50, 50, null);
        }
        if (characterChosen == 3) {
            g.drawImage(hero.image3, heroCurrentX, heroCurrentY, 50, 50, null);
        }
//------------------------------------------------------------------------------Drawing the coins
        g.drawImage(zombie.image, zombie.x, zombie.y, 50, 50, null);

        // Draw line to separate game field from bucket panel
        g.drawLine(0, 400, 500, 400);

        // Draw images on game field
        g.setColor(backgroundColor);
        
        if (coinPicked1 == true) {
            button1.setEnabled(false);    //Grays out the button
            item1.x = 5000;               // Moves the button offscreen (since we couldn't figure out a way to delete or un-draw the image)
        }
        else // coin has not been picked
        {
            g.drawImage(item1.image, item1.x, item1.y, 50, 50, null);
            rc1 = new Rectangle(item1.x, item1.y, 50, 50);
        }
        if (coinPicked2 == true) {
            
            button2.setEnabled(false); 
            item2.x = 5000;
        }
        else
        {
            g.drawImage(item2.image, item2.x, item2.y, 50, 50, null);
            rc2 = new Rectangle(item2.x, item2.y, 50, 50);
        }
        if (coinPicked3 == true) {                                 
            button3.setEnabled(false);  
            item3.x = 5000;             
        }
        else
        {
            g.drawImage(item3.image, item3.x, item3.y, 50, 50, null);
            rc3 = new Rectangle(item3.x, item3.y, 50, 50);
        }
        if (coinPicked4 == true) {
            button4.setEnabled(false); 
            item4.x = 5000;
        }
        else
        {
            g.drawImage(item4.image, item4.x, item4.y, 50, 50, null);
            rc4 = new Rectangle(item4.x, item4.y, 50, 50);
        }
        //----------------------------------------------------------------------
    }