Dim jmf As JavaObject = MainForm
Dim stage As JavaObject = jmf.GetField("stage")
If CHECK CODE then
stage.RunMethod("setMaximized", Array As Object(False))
Else
stage.RunMethod("setMaximized", Array As Object(True))
End If
Sub IsMaximized(frm As Form) As Boolean
Dim joForm As JavaObject = frm
Dim joStage As JavaObject = joForm.GetField("stage")
Dim Maximized As Boolean = joStage.RunMethod("isMaximized", Null)
Return Maximized
End Sub