Private Sub SetMoveListener(Form As JavaObject)
Dim Stage As JavaObject = Form.GetField("stage")
Dim XProp As JavaObject = Stage.RunMethod("xProperty",Null)
Dim YProp As JavaObject = Stage.RunMethod("yProperty",Null)
Dim O As Object = Form.CreateEventFromUI("javafx.beans.value.ChangeListener","FormMoved",Null)
XProp.RunMethod("addListener",Array(O))
YProp.RunMethod("addListener",Array(O))
End Sub
Private Sub FormMoved_Event (MethodName As String, Args() As Object) As Object
Dim F As Form = Sender
Log("Form moved " & F.WindowLeft & " : " & F.WindowTop)
End Sub