JavaFX inline scene in scene

I have an application that uses the javafx scene for rendering, and I want to put this rendering in some GUI that I created, also in javafx. How can I do it?

Basically, there is some kind of container in which I can put the scene, and then put this container in the graphical interface.

Sorry if this is a newbie question, I'm new to JavaFX

+5
source share
2 answers

The scene has only the top parent node as the root. You can get it and put it in another scene.

((Pane) scene2.getRoot()).getChildren().add(scene1.getRoot());
+5
source

Java 8 has SubScene , for which some options are possible (from javadoc):

SubScene . SubScene , , . . :

  • 2D 3D
  • Heads-up

SubScene - , . SubScene : 3d- JavaFX 8?

SubScenes 2D 3D . , , , , Uluk .

+5

Source: https://habr.com/ru/post/1529917/


All Articles