title: Binding int to Label in javaFX
body: <p>I'm trying to bind a <code>int</code>object to a <code>Label</code> in javaFX and i don't want to change the type in the model to a <code>IntegerProperty</code>. I tried as</p>
  
  <p><code>mainActionLabel.setText(myintvar);</code></p>
  
  <p><code>mainActionLabel.textProperty().bind(new SimpleIntegerProperty(myintvar.asString());</code></p>
  
  <p>but the value only updates if i close and open the gui again, so i guess the bind is not <em>really</em> working since i imagine it updating with the setText method.</p>
  
  <p>Is there another way to properly bind it?</p>
  
  <p>Edit: I just tried to remove the </p>
  
  <p><code>mainActionLabel.setText(myintvar);</code></p>
  
  <p>line but the problem persist as before: the is initialized correctly, but does not update in real time. Only if I close the window and reopen it.</p>