B4J Code Snippet Full Screen Form

For my project I've needed to fullscreen form on Raspian (bellsoft-jdk11.0.11)
I founded a solution here.
Then converted to B4J
B4X:
    MainForm.Resizable=False  
    Dim jform As JavaObject = MainForm
    Dim jStage As JavaObject=jform.GetFieldJO("stage")
    jStage.RunMethod("setMaximized", Array(True))
    jStage.RunMethod("setFullScreen", Array(True))
    jStage.RunMethod("setFullScreenExitKeyCombination", Array(jform.InitializeStatic("javafx.scene.input.KeyCombination").GetField("NO_MATCH")))
    MainForm.AlwaysOnTop=True

Thats all :)
 
Last edited:

u75

New Member
Although this is an old thread but I want to indicate a minor mistake in above code under line # 6. Instead of:
B4X:
Array(jo.InitializeStatic
it should be:
B4X:
Array(jform.InitializeStatic

Thanks to Androh for the code. It works :)
 

androh

Member
Licensed User
Longtime User
Although this is an old thread but I want to indicate a minor mistake in above code under line # 6. Instead of:
B4X:
Array(jo.InitializeStatic
it should be:
B4X:
Array(jform.InitializeStatic

Thanks to Androh for the code. It works :)
Thank you :)
 
  • Like
Reactions: u75
Top