The Hyperlink control is a button that has the appearance of a link seen in a browser. It can have a graphic, text, or both, and it responds to mouse rollovers and clicks. In Step 19 of the previous exercise, you clicked the Hyperlink control shown in Figure 6-9. As a result, a message was printed to the Java console indicating that it was clicked. The following code snippet from Listing 6-12 implements this functionality in the StarterApp program:

Hyperlink link = new Hyperlink("Hyperlink");
link.setOnAction(e -> System.out.println(e.getEventType() + " occurred on Hyperlink"));