Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
TextField1.RequestFocus
AddKeyPressedListener
End Sub
Sub AddKeyPressedListener
Dim r As Reflector
r.Target = MainForm.RootPane
r.AddEventFilter("keypressed", "javafx.scene.input.KeyEvent.ANY")
End Sub
Sub KeyPressed_Filter (e As Event)
Dim jo As JavaObject = e
Dim keycode As String = jo.RunMethod("getCode", Null)
If keycode = "TAB" Then e.Consume
End Sub