'Create a datepicker and add to the mainform
'Define JavaObject (requires JavaObject Library) Private joDatePicker As JavaObject
'Reference:http://javafx.scene.control.DatePicker
Sub CreateDatePicker
'Init the datepickerobject
joDatePicker.InitializeNewInstance("javafx.scene.control.DatePicker", Null)
MainForm.RootPane.AddNode(joDatePicker, 0, 0, -1, -1)
'Set some properties
joDatePicker.RunMethod("setShowWeekNumbers", Array As Object(True))
'Set actual date
Dim joLD As JavaObject
joLD.InitializeStatic("java.time.LocalDate")
joDatePicker.RunMethod("setValue", Array As Object(joLD.RunMethod("now", Null)))
End Sub
'Get the selected datevalue and add to a label view
Sub ButtonDatePicker_Action
LabelDatePicker.Text = joDatePicker.RunMethod("getValue", Null)
End Sub