JavaFX 2.2: how to bind String to Integer?
Bindings#bindBidirectional
expects a StringConverter[Number]
, you are providing a StringConverter[Integer]
. Though it may not be intuitive, you'll have to use a NumberStringConverter
instead.
Bindings.bindBidirectional(startPageField.textProperty(),
startPageProperty,
new NumberStringConverter());