…
Dim windowHeight As Double = asJO(MainForm.RootPane).RunMethodJO("getScene",Null).RunMethodjo("getWindow",Null).RunMethod("getHeight",Null)
Dim sceneHeight As Double = MainForm.RootPane.Height
Log(windowHeight) ' height including title
Log(sceneHeight) ' usable height inside rootpane
Dim titleBarHeight as Double = windowHeight - sceneHeight
Log($"Window Title bar is ${titleBarHeight} pixels"$)
End Sub
' uses JavaObject library
Sub asJO(o As JavaObject) As JavaObject
Return o
End Sub