### Set Form Full Screen

To set a form to full screen mode - undecorated window, use an API method (requires the JavaObject library).
Reference: http://docs.oracle.com/javase/8/javafx/api/javafx/stage/Stage.html
Note: The ESC key is used by default to leave the full screen mode.
Sub to set Form to Full Screen
`Sub SetFullScreen(frm As Form)
'Create a new JavaObject and assign the form
Dim joForm As JavaObject = frm
'Get the stage field from the form
Dim joStage As JavaObject = joForm.GetField("stage")
'Set iconified to false
joStage.GetFieldJO("stage").RunMethod("setIconified", Array(False))
'Set Full Screen to the stage which is bind to the form
joStage.RunMethod("setFullScreen", Array(True))
End Sub`
The code can be shortened:
Dim joForm As JavaObject = MainForm
joForm.GetFieldJO("stage").RunMethod("setFullScreen", Array(True))
Call Example for the MainForm
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
SetFullScreen(MainForm)
End Sub`
Get the Full Screen State
`Sub IsMaximized(frm As Form) As Boolean
Dim joForm As JavaObject = frm
Return joForm.GetFieldJO("stage").RunMethod("isFullScreen", Null)
End Sub`

Changed: , Category: Forms, File: T6C195M1429.htm, ID: 1429