I recently showed an Aperture-like loupe implemented in Swing. As usual, you guys are way too picky about demos and asked for a couple of fixes :p The following links point to an updated version of the demo. You can now change the magnifying power of the loupe and it will show only the picture that sits directly underneath the mouse cursor. This new version should also fix the bug when the frame was minimized/maximized but I don't know for sure since I haven't tried it on Windows yet.
The source code is available. Keep in mind the goal of this demo is to explain how to use layered panes, not to create a fully functional, bug-free loupe ;-)