Display animated gif on jPanel
<p>In the overridden function for my <code>JFrame</code>:</p>

<pre><code>@Override
protected void paintComponent(Graphics g) {

    BufferedImage imagePerson;
    try {
        imagePerson = ImageIO.read(new File("errol.gif"));
    } catch (IOException e) {
        imagePerson = null;
    }

    g.drawImage(imagePerson, i * increment, j * increment - 1, null);
}
</code></pre>

<p>How can I change this so the animation on the gif is shown (without using threading). I have spent many hours trying to get this to work but to no avail.</p>
