Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Main") 'Load the layout file.
MainForm.Show
RotateNode(MainForm.RootPane, 90)
End Sub
Sub RotateNode(View As JavaObject, Angle As Double)
Dim Rot As JavaObject
Rot.InitializeNewInstance("javafx.scene.transform.Rotate", Null)
Rot.RunMethod("setAngle", Array(Angle))
Rot.RunMethod("setPivotX", Array(View.RunMethod("getWidth", Null) /2))
Rot.RunMethod("setPivotY", Array(View.RunMethod("getHeight", Null) /2))
Dim Transforms As JavaObject
Transforms = View.RunMethod("getTransforms", Null)
Transforms.RunMethod("add", Array(Rot))
End Sub