Why would you want to do that?
I never saw scroll bars used for zooming, it's really a strange request.
And anyway JScrollPane provides a scrollable view of a component and not scroll bars for free...
If you want to use a scroll bar for custom function use [url http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JScrollBar.html]JScrollBar[/url], add a listener to it and handle the events:
http://www.java2s.com/Code/JavaAPI/javax.swing/JScrollBaraddAdjustmentListenerAdjustmentListenerl.htm
I would recommend using a JSlider for this instead:
http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html
As Rodney_McKay says, the scrolls from JScrollPane are not designed for zooming. If you are drawing an static Image, first put the internnal component to the desired size and draw the image applying the transfrmation to your graphics object.
i've just seen this applet about speed dependant zooimng:
http://www-ui.is.s.u-tokyo.ac.jp/~takeo/java/autozoom/autozoom.htm
I would use it, for example, for displaying a map from Google Earth.
I propose you this., let's develop a bean that recieve an large Image and apply this technique, and that the user can choose between standard mode and this.
Who wants to envolve?