Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFx Changing Scenes from different Class

3440793Apr 27 2017 — edited Apr 28 2017

Hi, I've seen a descussion of how to change scenes but from the same class. I have to create a game and I divised the displays in classes. The menu class, loading screen class, game class, etc.. I planned to change the scene with the setScene function and then specifying the desired class's scene. Of course i'll have to initiate the desired class first. My question is: Is it the proper way of changing scenes? I'm a beginner and I'm not sure if whether what I'm doing is actually the proper / good way. Cause then, this imples that in each class I'll have to initiate other classes in order to get their scenes and move to them. Any advice plz?  I really need a confirmation on that. Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2017
Added on Apr 27 2017
2 comments
2,594 views