resize image with mouse

hi how can i resiza image or other component with mouse similer to jbuilder ide.....thanks
[119 byte] By [persianshadow] at [2007-9-30 17:39:26]
# 1
can i get the code for resize an component with mouse
dev113 at 2007-7-6 14:08:10 > top of Java-index,Administration Tools,Sun Connection...
# 2

In the class which handles the events,

in mousePressed event,

check which vertex of the bounded rectangle (of the image or component) has been clicked,

and in mouseDragged event,

draw the image setting the initial point of the bounded rectangle of the image or component as the diagonally opposite vertex of the currentvertex.

Until u release the mouse button, repaint the image with the changing dimensions.

BhavaniValivarthi at 2007-7-6 14:08:10 > top of Java-index,Administration Tools,Sun Connection...