JMF is old and pretty much abandoned but its libraries are still available for download and fully functional.
Yes, you can use the JMF-based freeware called krut. It runs fine on Windows 7 64-bit (I haven't tested it on other machines). You select the area of the screen you want to capture and the program dumps the pixels into a list of jpeg frames and encodes them in mov format. The program has its limitations but is perfectly competent within them. To get audio as well, enable "wave out-mix" under system Sounds/Recording in Control Panel (or whatever the analog is on your system).
The krut source code is also downloadable, but necessarily can't include the proprietary Sun code for the JMF library classes. I have played around with it using NetBeans IDE 7.1.1.
For source code at the level of the JMF binaries, try the open sources available from FMJ.