You can also look at classic arcade games as good starting projects, someone here a year ago did a really nice PacMan as a first project.
“How to write a game” really breaks down into 4 areas. Game design, art, coding techniques and the Java syntax.
The first is a long subject unto itself and is more art then science.
The second is a necessary part of any game project. You can design your code with “programmer art” but your going to need some good looking art (and sounds and such) to have a real professional looking end product.
( Look at cas’s Alien Flux for a great example of a technically simple game with good game design and great art.)
In terms of “how do I program a game in java” the answer is you do it the same as you do in any other language. Whether youa re doing 2D or 3D there are software “patterns” and techniques for all the fundemental forms of games (platform, isometric, FPS, etc). Any good bookm on programming a given kind of game will tell you the structure and techniques of that sort of game. Then its just a matter of translating from the syntax of the language its repsented in (typically C or C++) to Java. People here can help you with that.
For isometric games, I recommend the Premier Press book “Programming Isometric Games in DirectX 7”. Ignore the DX specific stuff but the techniques translate. In fact, I’ve done a translation of most of the basic tehniques to AWT already in a demo called “Scroller” you can download source to from the projects area.
To be honest though, if I were doing a 2D game today in J2SE, I’d probably go cas’s route and instead of using AWT for rendering I’d use OGL (JOGL in my case) and do it as mono-planar 3D in the zero plane.