Sub SliderBindLabel(sldr As Slider, fmt As String)
Dim lblvalue As Label
lblvalue.Initialize("lblvalue")
Dim joSlider As JavaObject = sldr
Dim joLabel As JavaObject = lblvalue
' Get the valueproperty of the slider as StringBinding
Dim vp As JavaObject = joSlider.RunMethodJO("valueProperty", Null).RunMethod("asString", Array(fmt))
' Bind the slider stringbinding to the label
joLabel.RunMethodjo("textProperty", Null).runmethodjo("bind", Array(vp))
' Add the label to the slider thumb
joSlider.RunMethodJo("lookup", Array(".thumb")).RunMethodJo("getChildren", Null).RunMethod("add", Array(lblvalue))
End Sub