JavaFX embed scene in scene
Java 8 has a SubScene, for which some possible uses (from the javadoc) are:
The SubScene class is the container for content in a scene graph. SubScene provides separation of different parts of a scene, each of which can be rendered with a different camera, depth buffer, or scene anti-aliasing. A SubScene is embedded into the main scene or another sub-scene. Possible use cases are:
- Mixing 2D and 3D content
- Overlay for UI controls
- Underlay for background
- Heads-up display
A SubScene is just a Node, so you can place it in the scene graph of an existing scene wherever you want. An example of SubScene usage is in the answer to: How to create custom 3d model in JavaFX 8?
Generally SubScenes are for mixing 2D and 3D content. If you are not doing that, then SubScenes probably don't apply to your situation and Uluk's answer will better serve your needs.
The scene has only a top parent node as a root. You can get it and to put into another scene.
((Pane) scene2.getRoot()).getChildren().add(scene1.getRoot());