what is problem with code while displaying image.........

i have overidden the JPanel paintComponent method in a thread.

paramPanel is a JPanel in main interface on which i have to show the image.

paramPanel is passed as a parameter to thread constructor

as

public Threading(JPanel imgPnl)

{

paramPanel = imgPnl;

}

and then it is used as following code to show image in jpanel on main interface.

but this code is not working . plz any body give sugestion about it

JPaneljPnl =new JPanel()

{

publicvoid paintComponent(Graphics g)

{

g.drawImage("c:\\form.jpg",15,15,600,400,jPnl);

paramPanel.add(jPnl);

paramPanel.repaint();

}

};

[1005 byte] By [@tifa] at [2007-10-2 22:05:01]
# 1
Duplicated post: http://forum.java.sun.com/thread.jspa?threadID=743500
warnerjaa at 2007-7-14 1:21:34 > top of Java-index,Java Essentials,New To Java...
# 2
any one plz further clearify solution.
@tifa at 2007-7-14 1:21:34 > top of Java-index,Java Essentials,New To Java...