Java, replacement for infinite loops?

前端 未结 9 797
花落未央
花落未央 2021-01-13 00:45

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){} l

9条回答
  •  情深已故
    2021-01-13 01:24

    Yep. Sounds like you're doing your drawing on the event dispatcher thread. Events (button presses) never have a chance to get called because you've never returned control from the last time it was called...

提交回复
热议问题