title: How can I display and smoothly zoom into images with Java?
body: <p>I'm trying to make a fractal generator in java. I thought it would be a fun programming exercise. It's coming along nicely so far - I am generating images of fractals on the imaginary plane and I can zoom in and pan around. But now I want to make smooth animations of zooming and panning and I have no idea how.</p>
  
  <p>My program first calculates an array of intensity values for my image. Then I make a <code>new BufferedImage</code>, and use <code>.setRGB()</code> in a loop to change the color of each pixel. Next, I use <code>myJLabel.setIcon(myImage)</code> to add the image to a JFrame. Is this an efficient way to add images to a window? Are there any other possibilities such as using a canvas of some kind?</p>
  
  <p>Currently when I zoom into an image, It is instantly replaced with an image zoomed in by a factor of 2. This is a bit jarring. Suppose I want to make a sooth animation that goes in between these two frames. Could I make an array of buffered images that are re-sampled bit by bit, then play them back at something like 30 fps? I've never made an animation with Java before. Any suggestions would be appreciated.</p>