/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/BindingDemo.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package javafx_calebfontenot;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
@author
public class BindingDemo {
public static void main(String[] args)
{
DoubleProperty d1 = new SimpleDoubleProperty(1);
DoubleProperty d2 = new SimpleDoubleProperty(1);
d1.bind(d2);
System.out.println("d1 is " + d1.getValue()
+ " and d2 is " + d2.getValue());
d2.setValue(70.2);
System.out.println("d1 is " + d1.getValue()
+ " and d2 is" + d2.getValue());
}
}