Answer the question
In order to leave comments, you need to log in
How to change the contents of a scene loaded from an fxml file immediately after the program starts?
To clarify the question: in the scene, an object of class Text displays: "Potato". And I need to replace it with what is written in some text file.
I tried to do this through the controller's constructor, binding the object I needed to a variable using @FXML, but when I tried to access this object in the constructor, it turned out that the link was empty - null. This is the only thing I could think of.
Answer the question
In order to leave comments, you need to log in
First, read how javafx works, then you will find out that the constructor cannot be used, but this interface must be used instead .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question