英文:
What is the "point" of root node in JavaFX?
问题
为什么 Scene
对象需要具有一个根节点?为什么 Scene
对象不能仅作为节点集合的占位符,而不将它们嵌套在根节点之下?
英文:
Why Scene
object needs to have a root node? Why Scene
object can't be just a placeholder for collection of nodes without them being nested under the root one?
答案1
得分: 4
"From Understanding the JavaFX Architecture
The JavaFX scene graph ... is a hierarchical tree of nodes that represents all of the visual elements of the application's user interface
A tree of nodes must have a single, root node.
Each node must have a parent node – except, of course, for the root node.
英文:
From Understanding the JavaFX Architecture<sup>1</sup>
> The JavaFX scene graph ... is a hierarchical tree of nodes that represents all of the visual elements of the application's user interface
A tree of nodes must have a single, root node.
Each node must have a parent node – except, of-course, for the root node.
<sup>1</sup> Part of Oracle's JavaFX tutorials.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论