JavaFX Tutorial #3: Changing Between Scenes

  Рет қаралды 135,897

Philip Johnson

Philip Johnson

Күн бұрын

Пікірлер: 71
@paola9478
@paola9478 6 жыл бұрын
4 years later and still relevant! Helped me fix a project
@imenjaouadi2
@imenjaouadi2 7 жыл бұрын
you sir saved 60 percent of one of my courses. I finally , successfully integrated my project thanks to you. THANK YOU!
@helderferreira8498
@helderferreira8498 8 жыл бұрын
Thanks for your help. A little tip. Do not wander far and prepare the speech
@SwissExperiments
@SwissExperiments 9 жыл бұрын
the sound is so out of sync! why would you do this?
@francisesete317
@francisesete317 9 жыл бұрын
Great! It had taken me forever to switch from the login screen. Thanks.
@donykisworo6709
@donykisworo6709 8 жыл бұрын
thank's for your tutorial. I want to know that how enable or disable button from another windows form?
@BlackAceCard
@BlackAceCard 5 жыл бұрын
This tutorial was a LIFESAVER!!!
@kamilaamarova4702
@kamilaamarova4702 9 жыл бұрын
Thank u so much!!!! I like this tutorial , because i did it))) and tommorow I should pass my assignment)
@hendrixschmidt
@hendrixschmidt 8 жыл бұрын
because with different packages like the MVC does not work call Stage?
@true_podejrzany
@true_podejrzany 10 жыл бұрын
Great video! However I got one problem. Loading a file works good for me when fxml file has AnchorPane at top of hierarchy. When its a StackPane for example. then i get java.lang.reflect.InvocationTargetException.... help!
@philipjohnson4094
@philipjohnson4094 10 жыл бұрын
I can't say for sure, but it is likely that the code is LOOKING for an AnchorPane. See if there is an explicit reference to AnchorPane or a cast to AnchorPane in the code associated with the FXML. Change that to, of course, Stackpane, or to something more generic, and it should work.
@xronizzz
@xronizzz 9 жыл бұрын
Philip Johnson I did that and nothing changed, any other ideas?
@Miketar2424
@Miketar2424 9 жыл бұрын
Thanks for this. Stack exchange has little info on simple pressing a button to change scenes and there is another video while well -meaning has 5 pages of code to do this. These 5 lines of code are fine for a simple task.
@Visionist
@Visionist 8 жыл бұрын
So the scenes are just overlapping each other (aka both working at all time, regardless which scene is prompted)?
@verrymariyanto8377
@verrymariyanto8377 6 жыл бұрын
You doesn't set the button..but when the login button you Pressed it can response..how you can do that?..
@nowthisisfuuun
@nowthisisfuuun 8 жыл бұрын
Really hard to follow because video and audio are out of sync
@danielfarrugia1866
@danielfarrugia1866 7 жыл бұрын
Is it possible to change scenes not from a button click ? I need to create a login screen which after the user clicks Login button sends the user data to the server (using websockets) and the server sends a response if the login is successful or not. After this response I need to change the scene if login is successful or add text the the error label.
@pureice484
@pureice484 6 жыл бұрын
must a button be use? can we click a label to change instead?
@vincenzomangini3138
@vincenzomangini3138 8 жыл бұрын
If i want a 3rd page that will open when an event occur on the second page is it similar coding required ?
@ChiaraFornataro
@ChiaraFornataro 2 жыл бұрын
you are a life saver
@accelerrate4901
@accelerrate4901 5 жыл бұрын
For some reason it was giving me and error saying that I couldn’t caste to Node
@sr.anderson4788
@sr.anderson4788 4 жыл бұрын
Gracias maestro :) saludos de México.
@francescopatriziozampetti9298
@francescopatriziozampetti9298 8 жыл бұрын
Hi thank you very much for the useful tutorial! I have ony one question: if want to change scene without using a button for example by entering a keyword using a textfield how can it be done?
@kosmynunlimited
@kosmynunlimited 8 жыл бұрын
make a text field with a listener on it. action event on whats typed in there...make an algorithm that when will detect the specified char,will execute the switch of scene.
@marielabonilla6677
@marielabonilla6677 5 жыл бұрын
i loved this video, you helped me so much. THANK YOU!!
@juansebastianpelaezvilla7821
@juansebastianpelaezvilla7821 7 жыл бұрын
Perfecto, justo lo que estaba buscando, te agradezco demasiado.
@duftcola
@duftcola 6 жыл бұрын
It give errors if I have to use more than 2 scenes.....
@godwingad3352
@godwingad3352 7 жыл бұрын
This Video Saved My Life
@diegopereira5652
@diegopereira5652 7 жыл бұрын
Thank you very much for the help my companion! Hugs
@TimleyDegreeIII
@TimleyDegreeIII 8 жыл бұрын
This video saved my life...
@Amanraj-cv8rz
@Amanraj-cv8rz 6 жыл бұрын
How to Change the scene in the same window
@joaovitor12full
@joaovitor12full 8 жыл бұрын
I've made it on eclipse, great tutorial!
@muhammadraihansuryanom234
@muhammadraihansuryanom234 5 жыл бұрын
are you heath ledger brothers ?
@MiguelVillaAVilla
@MiguelVillaAVilla 10 жыл бұрын
Hi hello can you explain me how to make a sign off, because i tried but i can't return to the log in scene, thank you
@vergilkilla1
@vergilkilla1 10 жыл бұрын
Hello Miguel, A cheap and easy solution would be to put a new button on the Home Page. then rig the scene changing code that change from login->homepage, just put in the login screen info. Code would be along the lines of: Parent login_page_parent = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml")); Scene login_page_scene = new Scene(login_page_parent); Stage app_stage = (Stage) ((Node)event.getSource()).getScene().getWindow(); Same as our code to change from Login to Homepage, just vice versa.
@jfprograma4004
@jfprograma4004 9 жыл бұрын
+vergilkilla1 I did that and this was the result Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774) at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657), can you help me please.
@Kejzeren
@Kejzeren 9 жыл бұрын
+jeferson correa pino Hi, I had same problem. It is because you have defined something in the: "public void initialize(URL url, ResourceBundle rb)" function that is not compatible with the other window. Try to delete everything in that function and it might work. (It worked for me)
@jfprograma4004
@jfprograma4004 9 жыл бұрын
Ok
@purshotamrajthala3883
@purshotamrajthala3883 4 жыл бұрын
Not working
@khoulouddaghsni1231
@khoulouddaghsni1231 7 жыл бұрын
i have exception errors :( can you help me ?
@VictorAlexandre-yf8rm
@VictorAlexandre-yf8rm 6 жыл бұрын
Man, you surely helped me a lot, many thanks!!!
@air_id_as
@air_id_as 4 жыл бұрын
Thank you. Worked
@meowmal506
@meowmal506 2 жыл бұрын
did not work.
@thatguyscottcom
@thatguyscottcom 9 жыл бұрын
Where's the sound??? I have to turn up to max just to hear you. Hope a commercial doesn't pop up cause it'll blow my speakers!
@sarahomegayuliesimorangkir5156
@sarahomegayuliesimorangkir5156 3 жыл бұрын
Thanks a lot!
@MrPiikkipallo
@MrPiikkipallo 7 жыл бұрын
I thank you sir! Great tutorial :)
@zed6074
@zed6074 5 жыл бұрын
very helpful thank you
@TheMofuckingCarter
@TheMofuckingCarter 7 жыл бұрын
Nice Video. Runescape user name?
@DimYurych
@DimYurych 7 жыл бұрын
thx u man. really u help so much!!!!
@supunsandeeptha2249
@supunsandeeptha2249 5 жыл бұрын
Thanks, Much helpful
@siergos1
@siergos1 8 жыл бұрын
which league are you in at league of legends :D
@philipjohnson4094
@philipjohnson4094 8 жыл бұрын
Hahhh I don't play anymore. Even at the time of this video I did not play anymore. However, back when I did play, farthest I got was Silver. Not especially good at all lol.
@زهراءاكرم-ع9ك
@زهراءاكرم-ع9ك 5 жыл бұрын
i want the code plezzzz
@efrmarkus5553
@efrmarkus5553 7 жыл бұрын
You hepl me to do my project. Thanks)
@KaaBockMehr
@KaaBockMehr 8 жыл бұрын
you should have fixed your sound issue. but it was helpful anyways- thumbs up
@texteacher7706
@texteacher7706 7 жыл бұрын
Your voice volume is so inconsistent it's to hard to understand you
@brynclegg7235
@brynclegg7235 8 жыл бұрын
Cheers, there are too many videos that over-complicate this!
@siham3801
@siham3801 8 жыл бұрын
Cool thank you!
@Etern1tytv
@Etern1tytv 4 жыл бұрын
thank you
@yerkeboolean
@yerkeboolean 7 жыл бұрын
Very nice
@pertu_co
@pertu_co 6 жыл бұрын
Thank you!
@abhinandrk5849
@abhinandrk5849 9 жыл бұрын
ummma thanks really awesome!!!
@1burakdgn
@1burakdgn 5 жыл бұрын
Thanks.
@marcio3560junior
@marcio3560junior 6 жыл бұрын
Thanks a lot
@nife6902
@nife6902 4 жыл бұрын
I love u
@workhar
@workhar 10 жыл бұрын
thanks
@PSYKIKVIRUS
@PSYKIKVIRUS 9 жыл бұрын
I see you are a LOL player..see you on the fields of justice.
@Keyakina
@Keyakina 8 жыл бұрын
i guess very outdated at this time isn't it?
JavaFX Tutorial #4: Login Scene Using SQLite Database
9:28
Philip Johnson
Рет қаралды 19 М.
Passing information between Scenes with Javafx
20:31
Jaret Wright
Рет қаралды 69 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
The Latest Celebrity Tech Scam…
19:21
Linus Tech Tips
Рет қаралды 2,5 МЛН
Using SceneBuilder and Controller class to change scenes in Javafx
14:45
JavaFX Multiple Controllers
15:26
MVP Java
Рет қаралды 51 М.
The concept of sending data between scenes in JavaFX
5:11
Random code
Рет қаралды 8 М.
Learn How to Use JavaFX Multiple Controllers and FXML Files
8:36
The Biggest React Framework You've Never Heard of
20:29
Theo - t3․gg
Рет қаралды 51 М.
1/10 - Introduction to JavaFX lifecycle and basics
11:45
JavaHandsOnTeaching
Рет қаралды 2,8 М.
JavaFx Tutorial - Switch Scenes
5:15
Doctor Byte
Рет қаралды 8 М.
JavaFX: Multiple Scenes Switching
9:44
Sean Mondesire
Рет қаралды 11 М.