ok, so I have a slot machine game, and whats a slot machine game, if the reels dont spin before changing to the final images.
so what i want to do is:
draw image
wait 100 milliseconds
draw image
wait 100 milliseconds
and so on,
now i have tried
Slot1.setImage(image1);
invalidate(); // <- the repaint method
Thread.sleep(100);
slot1.setImage(image2);
invalidate();
Thread.sleep(100);
slot2.setImage(image3);
but all it does is wait the 200 milliseconds then changes it to the final image, without showing the image1 or image2.
now i dont have a game loop, because, i dont actually need one with this game, as the screen only needs to be rendered when one button is clicked, not so many times a second.
so what i would like to know, is how can i get this to wait?