Java, replacement for infinite loops?
I am making a program that shows cellular growth through an array. I have gotten it so when I press the start button, the array updates every 10 seconds in a while(true){} loop. The problem with that is I want to be able to stop the loop by pressing the pause button, but while in the loop, it wont let me use any of the controls. I need something other than a infinite loop in orer to refresh the frames. I am a bit of a newbie, but I am in a java class at the moment. so I have some grasp of the language. OscarRyz What you need is use a Timer which changes the state of your component ( in this