I'm trying to replicate my code from in Python with Java to make a snake game. Upon setting up the basics of the game, a helpful person from IRC found me a thread which ra4king posted in that gave the exact details of a perfect game loop.
This is, however, where my problem started. I implemented all the code and then ran it. Immediately I noticed the window lagging and taking some time to move it around or actually do anything and the FPS that was being printed was 6000-8000, strange? This loop is here, http://www.java-gaming.org/topics/about-on-my-main-loop/26222/msg/229028/view.html#msg229028
My code is in the following - https://dl.dropbox.com/u/102063272/Snake.zip
Note: I am running this in Ubuntu, but when Xardov ran it on Windows 7 it runs perfectly fine at 800-1600 FPS.