Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim iv As ImageView
Dim im As Image
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
im.Initialize("","c:/temp/hannah.jpg") ' the image
iv.Initialize("iv")
iv.SetImage(im)
MainForm.RootPane.AddNode(iv,10,10,100,100)
Dim jo As JavaObject = iv ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutXProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv.SetLayoutAnimated(5000,100,300,100,100)
End Sub
Sub moved_Event(MethodName As String, Args() As Object)' ignore the arguments
Log("X :"&iv.Left&" Y :"&iv.Top)' read the posn from the imageview
End Sub