If you want to paint an image from the paintComponent method of a component (usually a JPanel), you can use the drawImage of the Graphics object for that. It takes an X and Y position of its top-left corner, and optionally a width and height. If you provide the latter two the image will be scaled to use that size. For instance, to fill a JPanel completely:
If you now resize the panel, the image resizes along with it.
You can now use the same technique to zoom an image. Just use the right X and Y coordinates and the right size.