title: Why use JavaFX properties?
body: <p>Pardon my question if it may seem stupid but I'm curious. I am making a program in Java of which will have a GUI, and am curious about the whole idea of properties. Why use them when we can just add data to a class? For example:</p>
  
  <pre><code>class myButton extends Button {
  
     private boolean booleanProperty = false;
  
     myButton(args...) {
        // Do something with the property
     }
  
     public void setProperty(boolean value) {
        this.booleanProperty = value;
     }
  
     public boolean getProperty() {
        return this.booleanProperty;
     }
  }
  </code></pre>
  
  <p>Seems to work just fine for storing additional information on the custom implementation of the button. But what about:</p>
  
  <pre><code>class myButton extends Button {
  
     private SimpleBooleanProperty booleanProperty = new SimpleBooleanProperty(false);
  
     myButton(args...) {
        // Do something with the property
     }
  
     public void setProperty(boolean value) {
        this.booleanProperty.set(value);
     }
  
     public boolean getProperty() {
        return this.booleanProperty.get();
     }
  }
  </code></pre>
  
  <p>The only real difference, I am seeing (correct me if I'm wrong) is that that you can attach listeners to the property values, but I feel as if there has to be more than just that. Ideas?</p>