title: Why can't I make a call to a function while in a thread?
body: <p>I am multithreading a background process on a JFrame window, and I want to update the text of a global JLabel variable inside a function. </p>
  
  <p>So when the thread runs, my while and for loops run, but during them running, it makes the call to that other function to change the text.</p>
  
  <p>However, it doesn't update until the thread finishes executing (i.e when the loops finish). Any reason why this happens, and how I can fix this?</p>
  
  <p>If I try to just change the text of the JLabel inside the thread, it has the same result.</p>