Addition to that there is a Java library specifically designed to build games
http://lwjgl.org/
It handles,
Input,
Audio,
Graphics
with relatively easily than C++, since It uses native interfaces it is performance is good however not high as C++, but it's relatively easy.
following game is...