I use a timer when I do computergames that need constantly upgrades, but in the book “Developing games in java” it shows how to do a homemade gameloop.
The loop would loke something like this:
while(isRunning){
//Update game here
thread.sleep(20);
}
But this way I think the game speed will depend on how fast the updating is.
But what do you guys think is the best solution?