title: JavaFX Label double precision
body: <p>Currently, I'm practicing my JavaFX skills. Mostly, I'm trying to solve problem by myself, but this time it's out of my mind.</p>
  
  <p>I decided to create a unit converter. Everything was OK until I wanted to get my calculations inside Labels Mine code works good, but I'm not happy to see 10 or more decimals when I input numbers like 155.54 etc.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>value = input.getText().toString();
  dValue = Double.parseDouble(value);
  
      public void temperatureHandler() {
      if (cBox.getValue() == "Celsius (C)") {
          celsiusOutput.setText(Double.toString(dValue));
          fahrenheitOutput.setText(Double.toString((dValue * 1.8) + 32));
          kelvinOutput.setText(Double.toString(dValue + 273.15));
      }
      else if (cBox.getValue() == "Fahrenheit (F)") {
          celsiusOutput.setText(Double.toString((dValue - 32) / 1.8));
          fahrenheitOutput.setText(Double.toString(dValue));
          kelvinOutput.setText(Double.toString((dValue + 459.67) * 5/9));
      }
      else if (cBox.getValue() == "Kelvin (K)") {
          celsiusOutput.setText(Double.toString(dValue - 273.15));
          fahrenheitOutput.setText(Double.toString((dValue * 1.8) - 459.67));
          kelvinOutput.setText(Double.toString(dValue));
      }
  }
  </code></pre>
  
  <p>I have some experience in using String formats, StringBuilders etc. But I have no idea how can I set precision inside Label. I want to set it to 2 decimals.</p>
  
  <p>Thanks you in advance.</p>