As with the other issue you reported, you should upload a small project that reproduces it. Note that it is possible that things will not look identical. Many things have changed between Java 8 and Java 11. The visual side is mostly implemented in JavaFX not in B4J.
the problem where the form is bigger than u want i fixed with two lines WindowWidth & WindowHeight. (me used java 9)
i guess the limit only appear if the user resize the window.
other difference i saw u use AutoScaleAll in main form and not in the other.
B4X:
Sub Form2
frmCDAddition.Initialize("frmCDAddition",MainForm.Width-25, MainForm.Height-32)
'Load the main layout file
frmCDAddition.RootPane.LoadLayout("dtmm_mbaddcd")
frmCDAddition.AlwaysOnTop = True
frmCDAddition.Title = "MusicBase CD Addition"
frmCDAddition.SetWindowSizeLimits(575, 568, 575, 568)
frmCDAddition.WindowWidth = 575
frmCDAddition.WindowHeight = 568
frmCDAddition.SetOwner(MainForm)
frmCDAddition.Resizable = False
End Sub
And I thought I had tried every setting available …. with WindowWidth and WindowHeight working I can also remove the WindowSizeLimits.
That still leaves a problem with the object size on screen being "sdk dependant", and having found two anomalies already I am concerned there may be many more ...
Is there an "#if java11", "# if java 1.8" type of statement that would allow for two different sets of layouts?
That still leaves a problem with the object size on screen being "sdk dependant", and having found two anomalies already I am concerned there may be many more ...
If JavaLaterThan11_Check Then
' jdk11
frmCDAddition.WindowWidth = 575
frmCDAddition.Windowheight = 568
Else
' jdk1.8
frmCDAddition.WindowWidth = 567
frmCDAddition.Windowheight = 565
End If
With this sub:
B4X:
' Check Java Version
Sub JavaLaterThan11_Check As Boolean
Dim sJavaVersion As String = GetSystemProperty("java.version","0.0.0_00")
Return sJavaVersion.SubString2(0, sJavaVersion.IndexOf(".")) >= 11
End Sub