B4J Question MainForm.RootPane.LoadLayout("frmMAIN") 'Load the layout file.

claudio3g

New Member
Hi all,
I use B4J version 5.90 and I'm getting crazy with this, all seems to be ok, I see the layout file in file manager BUT I always get this error:
java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class

These are the lines of code I'm working on:

#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 400
#AdditionalJar: jtds-1.3.1.jar
#End Region

Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Sql1 As SQL
Private Url As String
Private Driver As String
Private txtId As TextField
Private txtValue As TextField
Private btnUpdate As Button
Private tbView1 As TableView
End Sub

Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.RootPane.LoadLayout("frmMAIN") 'Load the layout file.
MainForm.Title = "Stampe controllo produzione"
MainForm.Show

... many lines of code ...

End Sub

I'm new with B4J and Java, is there someone who can explain where is my error?

Bye

Claudio
 

DonManfred

Expert
Licensed User
Please use [CODE]code here...[/CODE] tags when posting code.

codetag001.png

codetag002.png

codetag003.png


Additionally you should post the full errormessage.
 
Upvote 0
Top