Directly connecting properties is not always enough. The Binding API can build complex dependencies between properties.
Using binding operations
String operations
Concatenation is the most common string operation. It's called by one property of the String type and takes another property of any type or a constant that will be used as a String, as shown in the following code snippet:
// chapter3/operations/ConcatBinding.java
label.textProperty().bind(
stage.widthProperty().asString() // property one
.concat(" : ") // concatting with a string constant
.concat(stage.heightProperty()) // concatting with a property 2
);
You don't need to call asString() for a concat() parameter, as...