tornadofx icon indicating copy to clipboard operation
tornadofx copied to clipboard

Fxml Loader Class not found

Open GnuaAruht opened this issue 3 years ago • 1 comments

When I use fxml for ui resources, fxml loader class is not found.

My View class class CounterView : View() { override val root: BorderPane by fxml() } Fxml file is located under resources directory `

<center>
    <VBox alignment="CENTER" spacing="10">
        <Label text="0">
            <font>
                <Font size="20"/>
            </font>
        </Label>
        <Button text="Click to increment" />
    </VBox>
</center>

</BorderPane>`

GnuaAruht avatar Jul 01 '21 02:07 GnuaAruht

provide the FXMl header and stacktrace. Also provide the paths where your FXML-file is located.

Fxml file is located under resources directory

at the root of the resource? then it is not a valid file path.

View and FXML-file must be in the same package or you must specify the path manually. Documentation: https://edvin.gitbooks.io/tornadofx-guide/content/part1/10_FXML.html

SchweinchenFuntik avatar Jul 01 '21 19:07 SchweinchenFuntik