Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Dim text As String = "Hello there how are you?"
Dim offset As Double = 10.0d
Dim cnt As Double = 0.0d
Dim tx() As JavaObject = toText(text)
For Each let As JavaObject In tx
MainForm.RootPane.AddNode(let,offset,50,-1,-1)
Next
For w = 0 To 3600 ' just 10 iterations
For Each letter As JavaObject In tx
offset = offset + 10 ' gap between letters fixed spacing
letter.RunMethod("setLayoutY",Array(100+(SinD(cnt+w)*60)))
letter.RunMethod("setLayoutX",Array(offset))
cnt = offset - 10.0d ' to correct start position
Next
Sleep(0)
offset = 10
cnt = 0
Next
End Sub