This chapter explains how to use JavaFX to draw simple pictures.
JavaFX is a collection of packages for writing graphics applications. It replaces older Java graphics packages and should be used for all new projects. JavaFX comes as part of the Java Development Kit 8 (JDK 8) and following.
With JavaFX you can create a window
and put a
Scene containing geometrical shapes into it.
The geometrical shapes can be
lines, ovals, rectangles, and other shapes.
You can pick the colors for the border and area of the shapes.
JavaFX is really big. This and the next chapters only cover a small part of it. User interaction (with buttons and mouse movements) is not covered until later.
In computer programming, what is a window?