1 import javafx.beans.property.DoubleProperty; 2 import javafx.beans.property.SimpleDoubleProperty; 3 4 public class BindingDemo { 5 public static void main(String[] args) { 6 DoubleProperty d1 = new SimpleDoubleProperty(1); 7 DoubleProperty d2 = new SimpleDoubleProperty(2); 8 d1.bind(d2); // Bind d1 with d2 9 System.out.println("d1 is " + d1.getValue() 10 + " and d2 is " + d2.getValue()); 11 d2.setValue(70.2); 12 System.out.println("d1 is " + d1.getValue() 13 + " and d2 is " + d2.getValue()); 14 } 15 }