InvalidationListener for IntegerProperty
import javafx.beans.InvalidationListener; import javafx.beans.Observable; import javafx.beans.property.IntegerProperty; import javafx.beans.property.SimpleIntegerProperty; public class Main { public static void main(String[] args) { IntegerProperty intProperty = new SimpleIntegerProperty(1024); final InvalidationListener invalidationListener = new InvalidationListener() { @Override public void invalidated(Observable observable) { System.out.println("invalidated: " + observable); } }; intProperty.addListener(invalidationListener); intProperty.set(2048); intProperty.removeListener(invalidationListener); intProperty.set(4096); } }