Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Dim tf As TextField = CreatePasswordField
MainForm.RootPane.AddNode(tf, 0, 0, 100, 50)
End Sub
Sub CreatePasswordField As TextField
Dim jo As JavaObject
jo.InitializeNewInstance("javafx.scene.control.PasswordField", Null)
Return jo
End Sub
I've successfully added a textfield with password property.
But how could I add an event to this node e.g. Action / Mouseclicked etc.
(Because the textfield is not initialized as in the usual simple way so I could not assign an eventname to it)
This is true. If you need to add the events then you should load it from a layout file. You can create a layout file with only this field and load it (one or more times).