


Nodes: Shapes (2-D and 3-D), images, media, embedded web browser, text, UI controls, charts, groups, and containers The javafx.scene API allows the creation and specification of several types of content, such as: Animating various graphics in the scene graph can be accomplished quickly using the javafx.animation APIs, and declarative methods, such as XML doc, also work well. Unlike in Swing and Abstract Window Toolkit (AWT), the JavaFX scene graph also includes the graphics primitives, such as rectangles and text, in addition to having controls, layout containers, images and media.įor most uses, the scene graph simplifies working with UIs, especially when rich UIs are used. It can also have the following:Įvent handlers (such as mouse, key and input method)

With the exception of the root node of a scene graph, each node in a scene graph has a single parent and zero or more children. Each node has an ID, style class, and bounding volume. It can handle input and can be rendered.Ī single element in a scene graph is called a node. It is a hierarchical tree of nodes that represents all of the visual elements of the application's user interface. The JavaFX scene graph, shown as part of the top layer in Figure 2-1, is the starting point for constructing a JavaFX application.
