title: Java: Let GUI change between different states with pauses
body: <p>Is there a way in Java to let the GUI change between several states but pause shortly between each change, so that it will appear like an animation? (without using JavaFX pre-defined animations)</p>
  
  <p>As a simple example: Let's have an array with 100 strings. Every 50 milliseconds the string depicted in the GUI/textfield should change, iterating through the given array. At the same time the GUI should remain responsive and the 'animation' should be stoppable by a button click.</p>
  
  <p>Is there a way other than using Thread.wait() or sleep() or is this the only possible option in Java? How can the GUI remain responsive? </p>