Zoom in and out of images in Java

Decoy

New Member
I think the question is quite self-explainitory, I want to implement a simple zoom function using a \[code\]JSlider\[/code\] like in Windows Live Photo Gallery for instance.I've had a quick look online but all the code I've tried to use appears to have errors in when I copy it into eclipse. I don't really want to use a third party library either as the application may be sold under a company name. Plus, I'm begginning to realise that there may be some safety precations required in order to prevent errors, but I do not know what these will be.So, if anybody can provide me with some Java code to zoom in and out of images it would be grately appreciated.Thanks in advancePS I plan to use the Image as an \[code\]ImageIcon\[/code\] inside of a \[code\]JLabel\[/code\] which will be added to a \[code\]JScrollPane\[/code\]
 
Top