Exception in thread
<pre><code>    public class Intro extends JFrame implements ActionListener {
        ImageIcon pic = new ImageIcon(this.getClass().getResource("cars-games.jpg"));
        JLabel l1 = new JLabel();
        Image car = pic.getImage();

        public static void main (String[]args){
            Intro i = new Intro();
            i.show();
        }    
    }
</code></pre>

<p>Its giving me this error:</p>

<pre><code>Exception in thread "main" java.lang.NullPointerException
    at javax.swing.ImageIcon.&lt;init&gt;(Unknown Source)
    at Intro.&lt;init&gt;(Intro.java:15)
    at Intro.main(Intro.java:58)    
</code></pre>

<p>Can anyone help plz.</p>
