February 2017
Beginner
1056 pages
28h 57m
English
Painting is silent poetry, and poetry is painting that speaks.
—PLUTARCH (ca. 46–127)
In this section we create a JavaFx application that uses a loop to produce its drawing. The program will also use an if statement and the method setFill, both of which are described in the previous chapter. In addition, we introduce the methods setFont and fillText and use them to write text in the window.
Listing 4.9 contains a JavaFx application that displays a sequence of seven faces. The first five faces alternate in color between light gray and white, and each has a bit more of a smile than the one before. The sixth face is throwing a kiss to the user, and the seventh face is blushing ...
Read now
Unlock full access