Source Code : Change new value for IntegerProperty with set method

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Change new value for IntegerProperty with set method

 
import javafx.beans.binding.Bindings;
import javafx.beans.binding.NumberBinding;
import javafx.beans.binding.StringExpression;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;

public class Main {
    public static void main(String[] args) {
        IntegerProperty x1 = new SimpleIntegerProperty(0);
        IntegerProperty y1 = new SimpleIntegerProperty(0);

        final NumberBinding area = x1.multiply(y1)
                .divide(2.0D);

        StringExpression output = Bindings.format(
                "For A(%d,%d), the area is %3.1f",
                x1, y1, area);

        x1.set(0); y1.set(0);

        System.out.println(output.get());

        x1.set(10); y1.set(110);

        System.out.println(output.get());
    }
}

   
  

Thank with us