Search code examples
javafx-2scenefxml

Multiple scenes (FXML File) concurrently running in one stage?


Im trying to figure out if it is possible to run 2scenes concurrently in one stage...

Here's the scenario i have two scenes, and i use borderPane layout; I want to place the first scene at the top of my layout and the other one to the center.

now the question is it possible?


I already consult google and even my other colleague but still stuck with this problem.


Solution

  • Scene is a part of the window inside the Stage. You can't have two of them in one Stage simultaneously.

    If you want to have different content on top and center you can use any layout classes, e.g. Pane instead of Scene.