title: JavaFx Label text = variable
body: <p>I have a JavaFX GUI in an fxml file with its controller class defined. I have two text items that I want in that GUI, one tied to a variable whose value does not change until the user reloads the screen, the other I would think needs to be a StringProperty as it shows the running total of a column in my TableView. Because of what they are, I'm trying to use Label instead of a TextField as their display control.</p>
  
  <p>I liked Sebastian's answer to this problem here:</p>
  
  <p><a href="https://stackoverflow.com/questions/13227809/displaying-changing-values-in-javafx-label">Displaying changing values in JavaFx Label</a></p>
  
  <p>however, when I try to use it I get a compile error that says:</p>
  
  <pre><code>cannot find symbol
     symbol: variable textProperty
     location: variable salesNoLabel of type Label
  </code></pre>
  
  <p>I'm not sure what I'm doing wrong, but to start with, my label text is initially set in the fxml file, so in my controller I just have its fx:id substituted for "myLabel" listed in Sebastian's answer:</p>
  
  <pre><code>salesNoLabel.textProperty.bind(sn);
  </code></pre>
  
  <p>where salesNoLabel is the fx:id of the label and sn is a string variable.</p>
  
  <p>Not sure if you need to see more of my code to help me with this problem, but thanks in advance for checking it out.</p>