JavaFX fundamentals
Cities such as New York, London, Paris, and Moscow have many theaters, and people who live there cannot avoid hearing about new plays and productions released almost every week. It makes them inevitably familiar with theater terminology, in which the terms stage, scene, and event are probably used most often. These three terms are at the foundation of a JavaFX application structure, too.
The top-level container in JavaFX that holds all other components is represented by the javafx.stage.Stage
class. So, you can say that, in the JavaFX application, everything happens on a stage. From a user perspective, it is a display area or window where all the controls and components perform their actions (like actors in a theater). And, similar to the actors in a theater, they do it in the context of a scene, represented by the javafx.scene.Scene
class. So, a JavaFX application, like a play in a theater, is composed of Scene
objects presented inside the Stage
object one at...