June 2017
Beginner
1296 pages
69h 23m
English
Throughout this chapter, we’ve demonstrated many two-dimensional graphics capabilities. In Java SE 8, JavaFX added several three-dimensional shapes and corresponding capabilities. The three-dimensional shapes are subclasses of Shape3D from the package javafx.scene.shape. In this section, you’ll use Scene Builder to create a Box, a Cylinder and a Sphere and specify several of their properties. Then, in the app’s controller, you’ll create so-called materials that apply color and images to the 3D shapes.
Box, Cylinder and SphereFigure 22.16 shows the completed FXML that we created with Scene Builder:
Lines 16–21 define the Box object.
Lines 22–27 define the Cylinder object.
Lines 28–29 define ...
Read now
Unlock full access