In Java theres a method called setdelay

thats what you use.


int Speed=0 ;
for (int i =0; i < 5; i++){
window.setDelay(50 * i);