I have the following Problem. I want to concat a String with an DoubleBinding to an String property.
Slider slider = new Slider(1, 5000, 500);
Label sliderValue = new Label();
sliderValue.textProperty().bind(Bindings.concat("Sleep: ", slider.valueProperty()));
This is working fine.
But I don't want to display the Double Binding as an Double, I want to round it to an int.
As you can see in the screenshot the Number is added as an Double to String.
Is there any way to do that, without creating an Listener?
Sry if my english it not correct. :P
You can use Bindings.format instead: