Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private SplitPane As JavaObject
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.RootPane.LoadLayout("Main") 'Load the layout file.
MainForm.Show
SplitPane.InitializeNewInstance("javafx.scene.control.SplitPane", Null)
MainForm.RootPane.AddNode(SplitPane, 0, 0, -1, -1)
MainForm.RootPane.SetAnchors(SplitPane, 10, 10, 10, 10)
'Adding 3 panes to the splitpane
Dim ap1 As AnchorPane
ap1.Initialize("")
ap1.Style = $"-fx-background-color:blue;"$
Dim ap2 As AnchorPane
ap2.Initialize("")
ap2.Style = $"-fx-background-color:white;"$
Dim ap3 As AnchorPane
ap3.Initialize("")
ap3.Style = $"-fx-background-color:red;"$
Dim SplitPaneItems As List = SplitPane.RunMethod("getItems", Null)
SplitPaneItems.AddAll(Array(ap1, ap2, ap3))
SplitPane.RunMethod("setDividerPositions", Array(Array As Double(0.33, 0.66)))
' SplitPane.RunMethod("setOrientation", Array("VERTICAL"))
End Sub