title: JAVA Swing - Setting JLabel equal to a String in another class
body: <p>I have a method called <code>getTheUserInput</code> in a class which returns a String which updates based on user actions, which is located inside a class called Board.java. I have action which adds data to a String which I know works.</p>
  
  <p>In my other class I have a JLabel which has been set to equal the returned String of the method, as follows:</p>
  
  <pre><code>JLabel l = new JLabel(b.getTheUserInput());
  </code></pre>
  
  <p>However, when I run the application no matter what input the user provides, the string updates, but the JLabel stays blank. How do I keep the JLabel updated consistently with the string in the other class?</p>