25.3 JavaFX App Window Structure

A JavaFX app window consists of several parts (Fig. 25.1) that you’ll use in Sections 25.425.5:

Image

Fig. 25.1 | JavaFX app window parts.

• The window in which a JavaFX app’s GUI is displayed is known as the stage and is an instance of class Stage (package javafx.stage).

• The stage contains one active scene that defines the GUI as a scene graph—a tree data structure of an app’s visual elements, such as GUI controls, shapes, images, video, text and more. The scene is an instance of class Scene (package javafx.scene).

• Each visual element in the scene graph is a node—an instance of a subclass of Node (package javafx.scene ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.