icon resizing for window resizing

hi to all guruswell when i set an image as imageIcon for any panel/lable etc and when i resize the panel or change the resolution of the screen, the image gets cropped.is there any way where the image will resize itself to fit the current size of the panel?thanks
[291 byte] By [absent_mindeda] at [2007-11-27 5:56:22]
# 1
You need to custom paint the image using the Graphics.drawImage(...) method.
camickra at 2007-7-12 16:26:57 > top of Java-index,Desktop,Core GUI APIs...
# 2
[url= http://forum.java.sun.com/thread.jspa?threadID=784932]EasyResizing[/url]
crwooda at 2007-7-12 16:26:57 > top of Java-index,Desktop,Core GUI APIs...