Graphics doesn't draw image in java
<p>I have this class which should draw an image.</p>

<pre><code>package ro.adlabs.imnuriAZSMR.UIClases;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;

import java.io.IOException;

public class JImage extends JPanel {
    private BufferedImage image;
    private int height;
    private int width;

    public JImage(String imagePath,int height,int width) {
        try {
            image = ImageIO.read(getClass().getResourceAsStream(imagePath));
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        this.width = width;
        this.height = height;
    }
    public JImage(String imagePath,int size){
        new JImage(imagePath,size,size);
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawImage(image, 0, 0, width, height, this);
    }
}
</code></pre>

<p>And this Class which show an About Dialog:</p>

<pre><code>package ro.adlabs.imnuriAZSMR.UIClases;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class AboutDialog extends JDialog {
    public AboutDialog() {
        setTitle("About");
        setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
        JLabel name = new JLabel("&lt;html&gt;&lt;div style='text-align: center;'&gt;Aceasta aplicatie e dezvoltata sub Termenii si Conditiile ADLabs.&lt;/div&gt;&lt;/html&gt;");
        JLabel copyright = new JLabel("© ADLabs - www.adlabs.ro");
        name.setAlignmentX(0.5f);
        copyright.setAlignmentX(0.5f);
        add(name);
        add(new JImage("../ico/appicon_200x200.png",50));
        add(copyright);
        JButton close = new JButton("Close");
        close.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                dispose();
            }
        });
        close.setAlignmentX(0.5f);
        add(close);
        setModalityType(ModalityType.APPLICATION_MODAL);
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        setSize(300, 200);

    }
}
</code></pre>

<p>I add to the dialog the Image which is the app logo. First time when I created the JImage class it worked, it drawn the picture. Then I added the method:</p>

<pre><code>setSize(width+20,height+20);
</code></pre>

<p>to the Jpanel in the JImage class and when I ran the program again it didn't draw the image. Then anything I did it didn't solve this wierd bug. 
Anyone has any ideea? What am I doing wrong?</p>