how to use scrollbar zooming image?
===

i want use scrollbar to zoomin and zoom out image but not work
whats wrong with my code?

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

public class piczoominandout extends JFrame



{
    
   
    public JScrollBar scroll;
    public JLabel lbl;
    public Image image;
    public int x, y, width, height;
    public piczoominandout()
   
    {
      
      super("picture zoom");
      
      Toolkit toolkit = Toolkit.getDefaultToolkit();
      
      image = toolkit.getImage("Snake.jpg");
      
      Container c = getContentPane();
      
      ImagePanel imagePane = new ImagePanel(image);
      
      c.setLayout(new BorderLayout());
      lbl = new JLabel("0");
      c.add(lbl, BorderLayout.SOUTH);
      scroll = new JScrollBar(
               JScrollBar.HORIZONTAL,50,10,0,100);

      c.add(imagePane,BorderLayout.CENTER );

      c.add(scroll, BorderLayout.NORTH);
   }
   
    class ImagePanel extends JPanel
   
    {
   	public ImagePanel(Image img) { image = img; }
   	
        public ImagePanel()
   	{
   	scroll.addAdjustmentListener(new AdjustmentListener() {
         public void adjustmentValueChanged(
                             AdjustmentEvent evt) {
            JScrollBar s = (JScrollBar)evt.getSource();
            if ( !s.getValueIsAdjusting() ) {
               int v = (int)s.getValue();
               width +=v;
               height +=v;
               repaint(x,y,width,height);
               lbl.setText(Integer.toString(v));
            }
         } });
   	}

    public void paintComponent(Graphics g)
    {
    Insets ins = getInsets();
    super.paintComponent(g);
   	width = image.getWidth(this);
   	height = image.getHeight(this);
   	x = ins.left+5; y = ins.top+5;
   	g.drawImage(image,5,5,this);
    }
   
}
   
public static void main(String[] args)
   

{  
      
      piczoominandout app = new piczoominandout();
   
      app.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
      
      app.setSize(900,300); 
      
      app.setVisible(true); 
   
}

}