I don't know of any books, but I wrote a 2d game in Java which I lifted from download from the Java Boutique website. At least in 2001 there were tons of games and you could download the source code.
I'm working on a fullscreen java app that consists of a 320x320 field of randomly-colored dots, a variable percentage of which should eventually move in concert at up to 100 fps. Right now I'm simply ...