This applet demonstrates how to load and draw images, as well as how to work with mouse events relating to motion in the Java 1.1 event model. It just loads and displays an image, which you can resize by clicking and draging the mouse. Dragging to the left lessens the width, while dragging to the right increases the image width. Similarly with up and down dragging and the image height.

The source.