B4J Question Root hasn't been set ... Problem

alienhunter

Active Member
Licensed User
Longtime User
Hi
I have a older Project where i used Java 7 and now when i compile it in Java 8
and now this error comes up

javafx.fxml.LoadException: Root hasn't been set. Use method setRoot() before load.

this code is working in Java 7

B4X:
Log(cursor1.GetString("jobnr"))

        Dim p As AnchorPane
        p.Initialize("")
        p.LoadLayout("ListItem")
        p.Style="-fx-background-color : black"

list1.Items.Add(p)

Loop

any clues
thanks AH
 

alienhunter

Active Member
Licensed User
Longtime User
Does your .fxml file contain the following in it?
<fx:root type="

Based on some research that could be the problem.

Thanks , the list view it does not have the root type in the fx id

Edit :
it is much simpler
the loading layout has to be "do not use Fx:root Constuct" set and it works
AH
 

Attachments

  • fx.jpg
    13.8 KB · Views: 610
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…