JavaFX Problem
Hello the controller returns null somehow can anybody help?
25 Replies
⌛
This post has been reserved for your question.
Hey @lip! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.


i make is
loader.getController
but getController returns null tooUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
It returns false
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
loader false but not controller

this returns true
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
wdym
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View


Wait the problem was scene
i didnt load fxmlloader to scene
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
At where
@lip , use
FXMLLoader.load
static method
The constructor is used for relative bindingsWhat is it loading
Dont i need to load from a special loc
instead of
new FXMLLoader...
use FXMLLoader.load
FXMLLoader.load(getClass().getResource("afterloginstage.fxml"))
Should give you back the controller, but my JavaFX is rusty 🙂Ah is there a method?
Think i should look at javadocs
Just try it
And then look at the docs 🙂
Thank you
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.