JavaFX Detailed Reviewer IT206
JavaFX Detailed Reviewer IT206
Introduction to JavaFX
- JavaFX is a GUI framework in Java used to develop rich internet applications.
- It replaces older technologies like AWT and Swing.
- JavaFX allows styling using CSS and provides a modern approach to UI design.
2. JavaFX Components
- Stage: This is the main window where your JavaFX application is shown. Similar to
JFrame in Swing.
- Scene: A container for all content in a scene graph. You set the scene to the stage.
- Node: Any visual object in a scene, such as buttons, labels, text fields, etc.
- Examples of nodes include:
- Button: A clickable button.
- Label: Displays text.
- TextField: Accepts input from the user.
- ImageView: Displays images.
- Layouts: Used to arrange nodes in a scene.
- Examples include:
- VBox: Vertical layout.
- HBox: Horizontal layout.
- BorderPane, StackPane, GridPane: Other layout managers.