[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
JavaFX Java GUI Tutorial – 4 – Switching Scenes
by
Tags:
Comments
36 responses to “JavaFX Java GUI Tutorial – 4 – Switching Scenes”
-
guys, how can I repaint scenes after switching?
I found that you can repaint it by this code: scene1.getRoot().requestLayout();
requestLayout() is like repaint() in swing, but it doesnt work for me….
If i switch these scenes, sometimes appears black background. I can fix it only by resizing the window, so how can i repaint it? -
1000th like from me !
-
why dont you use an fxml for designing the interface? doing everything in java code is more work
-
Been following ur tutorials since I decided to go back to school, appreciate them!
-
The button on which am setting the action cannot be seen by the method that handles the event(the overridden method), why is that??
-
"…pretty stinkin' awesome" XD
-
Hey there, I have the same problem James Till mentioned before. The skript is the same, but if i press a button, nothing happenes. IM using eclipse oxygen, windows 8. Any ideas how to fix it?
-
Anyone know why window = primarystage ?
Cannot direct use primarystage? -
yesterday I found myself mumbling "I, love, switching, scenes, I, love…" while taking a shower.
-
Hey thenewboston! Great video, but I wonder if you can make a video about using multiple scenes in one stage. I didn´t really find a good tutorial on Youtube or even StackOverFlow and it would be awesome if you could add another great video to this playlist!
-
this is awesome, except that it doesn't work, it shuts down the event handling thread, what to do? some more Win10 issues?(it does work but doesnt switch scenes, code is the same, so its not that)
-
What's the difference between a VBox and a StackPane?
-
Very Helpful. But how about if we have menu and tool UI in the APP, and layout1 and layout2 share the same menu and tool. should I need to add it both in layout1 and layout2? does it will reload during we switch the scene?
-
Bucky you are stinkin funny and genius :p
-
Is it possible to add a single button object to more than one scene?
When I try to do this, my button is removed from the first scene
-
8:05 literally started doing that myself at the same time, HAHA
-
how to use in controller?
-
For the window stage why don't you just rename the primary stage object in the start method parameters.
-
You got forgot to import import javafx.scene.control.Label;
-
i need this but i have to do it in the main controller with scene builder..
-
Switching scenes is not working reliably with embedded Java. Do not do this on Raspberry PI for example.
-
I have a problem.
When I run, the scene pops up, but the button press doesn't change the scene. If I call "window.setScene(scene2);" it'll load that scene instead, but I can't swap the scenes. I've gone over the code, and I don't see any differences.
-
MAN I LOVE YOU ! THANK YOU SO MUCH ! 😀
-
what about scenes from a different class?
-
hello, is there a way for me to separate the gui components in javafx? like in java swing, i can create multiple classes of jpanels and assemble them in a jframe of another class?
-
<3 love java fx
-
man, u r awesome! Very clearly and simple material describing! Thank you a lot!
-
thanks please make some videos about simple java project like simple chat messneger,web browser etc 🙂
-
you could'v just renamed primaryStage to window
-
wtf? so much easier than fucking swing and cardlayout
-
Awesome tutorials. Would love to see the Advanced Java that you talked about in the last JavaFX video! They've got some awesome features in recent Java releases that I'm definitely not taking full advantage of.
-
You are hilarious! Thanks for the tutorial.
-
If you don't define import for Label in Eclipse, it gets it from awt instead of javafx, and add/addAll() methods fail.
If anyone knows how to set defaults to FX, feel free to reply 🙂
-
OOOO my god!! sorry please, definition "Stage acene1, acene2;' correct 'Scene acne1, acene2;' Sorry
-
Help me please, Im IDE Netbeans error "Incompatible types: Scene cannot be converted to Stage… You'r help me
-
Very useful but how can we switch scenes using scene builder? if I am correct, using scene builder implies putting the code in the controller class and not main so how would that work ?
Leave a Reply