JavaFX is the most recent graphical user interface (GUI) language from Oracle. JavaFX is the next step in the evolution of Java. It is designed to provide a lightweight, hardware-accelerated platform for enterprise business applications.
- [Instructor] You're probably wondering what is JavaFX? JavaFX is the most recent GUI, or graphical user interface, language from Oracle. You might consider JavaFX the next step in the evolution of Java. It's designed to provide a lightweight, a hardware-accelerated platform for both personal and enterprise business applications. As a JDK 7, JavaFX is automatically included with the standard JDK and JRE bundles.
If you're not running a current version of Java, please download the most recent JDK or JRE to use JavaFX. JavaFX uses what is called a scene graph to depict a hierarchical tree of nodes that represent all of the visual elements of the applications user interface. Here is a graphical picture of our hierarchy. At the very top we have our stage, you must have a stage in JavaFX. Then we have our scene and on our scene we can place one or more groups.
This group has both 2D and 3D objects. It has cylinder, sphere, and box which are our 3D objects as well as a 2D circle. Each element in a scene graph is called a node. And each node has an ID, a style class to attach CSS, and a bounding volume. The root node is the base node and it cannot have any parent nodes. All other nodes in a scene graph have a single parent and zero or more children.
For this series, we're going to concentrate on how JavaFX allows us to draw 2D and 3D objects.
- What is JavaFX?
- Creating charts
- Review of Java UI controls
- 3D shapes in JavaFX
- User-defined 3D shapes
- Add a camera
- Add lighting
- Apply shape materials
- Interacting with 3D scenes