16. Shapes, Text, and Images

The last two chapters introduced the concept of a node-based scene graph and demonstrated some of the ways in which you can control the appearance of a node and detect user interaction with nodes. This chapter opens by looking at a specific set of node subclasses called shapes. We have already made use of two of the shape classes in our examples so far—Circle and Rectangle. Here, we take a look at both of these classes, and the other shapes that the JavaFX runtime supports, in much more detail.

The second part of this chapter is concerned with two specific node subclasses that are worthy of greater attention. The first is the Text class, which is used to render text. Along with this discussion, this chapter introduces ...

Get JavaFX™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.