#Use multiple Controllers in Javafx
1 messages · Page 1 of 1 (latest)
<@&987246487241105418> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
i need both LoginController and SceneController
LoginCont. for login funcs
and SceneCont. for changing scene
to Signup
i want to use 2 controllers in 1fxml file
summary of question
#1121546952274886666 message
Ideally, you would do something like that
If you don't want to think to much and can afford to write garbage code, you can simply assign stuff to static variables and call them
uh
I'm not sure what you are asking. You show the login form with two buttons, login and sign up. I'm assuming the login form already has a controller. Are you asking how to open the sign up form when the sign up button is pressed?
If you need to change scene you can try to create an Observable and put a Listener on this observable, when you click on "Login" the observable change the value and launch the listener, now you just need to put your code like a lambda in your listener
I saw this article on swapping scenes that might help https://www.pragmaticcoding.ca/javafx/swap-scenes
yep
but by using another controller