Whether it's an applet or an application, you are going to need something beyond the standard Java API. I haven't paid attention to trends in scanners for a while, but it used to be that scanners operated according to a spec named TWAIN. And a long time ago there used to be code which interfaced between Java and TWAIN devices. Whether it still exists, or whether newer examples of such things now exist, I don't know.