public void render(Graphics g)
    {
        switch(state)
        {
            case INTRO:
                try
                {
                    g.setColor(Color.GREEN);
                    g.fillRect(0, 0, getWidth(), getHeight());
                    int width = 400, height = 200;
                    g.drawImage(getImage("Logo.png"), WIDTH / 2 - width / 2, 50, width, height, this);
                    playButton = new CustomButton("Play Game", this);
                    playButton.setBounds(50, 250, 200, 100);
                    playButton.draw(g);
                    quitButton = new CustomButton("Quit Game", this);
                    quitButton.setBounds(350, 250, 200, 100);
                    quitButton.draw(g);
                }
                catch (FileNotFoundException e)
                {
                    setVisible(false);
                    catchException(e);
                }
                break;

            case GAME:
                background.render(g, this);
                if(textTime > 0)
                {
                    g.setColor(Color.WHITE);
                    g.fillRect(0, HEIGHT - 80, WIDTH, 80);
                    g.setColor(Color.BLACK);
                    g.drawString(infoText, 10, HEIGHT - 60);
                }
                break;

            case PAUSE:
                g.setColor(Color.YELLOW);
                g.fillRect(0, 0, getWidth(), getHeight());
                menuButton = new CustomButton("Main Menu", this);
                menuButton.setBounds(50, 50, 200, 100);
                menuButton.draw(g);
                break;
        }
    }