src/Quiz.java
/**
     * Draws all graphics per frame
     * @param g Graphics reference
     */
Draws all graphics per frame
@param g Graphics reference
Draws all graphics per frame @param g Graphics reference
public void draw(Graphics g){
        g.drawImage(image,0,0,null);
        if(h1) g.drawImage(i1,0,0,null);
        else if(h2) g.drawImage(i2,0,0,null);
        else if(h3) g.drawImage(i3,0,0,null);
        else if(h4) g.drawImage(i4,0,0,null);
        q.draw(g);
        a1.draw(g);
        a2.draw(g);
        a3.draw(g);
        a4.draw(g);
        if(correct || incorrect){
            g.setColor(Color.black);
            g.fillRect(0,0,Game.WIDTH,Game.HEIGHT);
            g.setFont(new Font("Lucida Sans Typewriter", Font.ITALIC, 50));
            if(correct) {
                g.setColor(Color.green);
                g.drawString("C O R R E C T",200,320);
            }else if(incorrect){
                g.setColor(Color.red);
                g.drawString("I N C O R R E C T",140,320);
            }
            g.setColor(Color.white);
            g.setFont(new Font("Lucida Sans Typewriter", Font.PLAIN, 20));
            g.drawString("click anywhere to continue",245,530);
        }
        g.dispose();
    }
public void draw ( Graphics g ) { g . drawImage ( image , 0 , 0 , null ) ; if ( h1 ) g . drawImage ( i1 , 0 , 0 , null ) ; else if ( h2 ) g . drawImage ( i2 , 0 , 0 , null ) ; else if ( h3 ) g . drawImage ( i3 , 0 , 0 , null ) ; else if ( h4 ) g . drawImage ( i4 , 0 , 0 , null ) ; q . draw ( g ) ; a1 . draw ( g ) ; a2 . draw ( g ) ; a3 . draw ( g ) ; a4 . draw ( g ) ; if ( correct || incorrect ) { g . setColor ( Color . black ) ; g . fillRect ( 0 , 0 , Game . WIDTH , Game . HEIGHT ) ; g . setFont ( new Font ( "Lucida Sans Typewriter" , Font . ITALIC , 50 ) ) ; if ( correct ) { g . setColor ( Color . green ) ; g . drawString ( "C O R R E C T" , 200 , 320 ) ; } else if ( incorrect ) { g . setColor ( Color . red ) ; g . drawString ( "I N C O R R E C T" , 140 , 320 ) ; } g . setColor ( Color . white ) ; g . setFont ( new Font ( "Lucida Sans Typewriter" , Font . PLAIN , 20 ) ) ; g . drawString ( "click anywhere to continue" , 245 , 530 ) ; } g . dispose ( ) ; }
Draws all graphics per frame
 @param g Graphics reference
Draws all graphics per frame @param g Graphics reference