title: Java Properties Binding
body: <p>I have created a custom TextField (by extending javafx.scene.control.TextField) which I use to store monetary values eg say $120,000. I have called this class <code>CurrencyField</code> and It has two constructors <code>public CurrencyField()</code> and <code>public CurrencyField(String currency)</code> I also have a <code>public void setCurrency(String currency)</code> method for setting the currency symbol. One can out rightly set the currency by using <code>new CurrencyField(currency)</code> or set it later using the Setter Method - <code>setCurrency(currency)</code></p>
  
  <p>Usually, I want to be able to use different currency symbols based on conditions (outside the scope of this questions) Eg. I may want to switch the currency from $ to £ by clicking a button. In this case, I want all the CurrencyFields to immediately display the amounts with the new currency symbol.</p>
  
  <p>I have already learned that using <code>Properties</code> and <code>Binding</code> can be used to update one variable when another variable is updated without any extra methods.
  Now, in a more practical way, I want that if I call the <code>setCurrency("$")</code> method, a field with Rs2,000 will immediately display $2,000. </p>
  
  <p>How can I go about this using Properties and/or Binding or any other way basically?</p>