12.4 Welcome App—Displaying Text and an Image

In this section, without writing any code, you’ll build a GUI that displays text in a Label and an image in an ImageView (Fig. 12.2). You’ll use visual-programming techniques to drag-and-drop JavaFX components onto Scene Builder’s content panel—the design area. Next, you’ll use Scene Builder’s Inspector to configure options, such as the Labels’s text and font size, and the ImageView’s image. Finally, you’ll view the completed GUI using Scene Builder’s Show Preview in Window option. In Section 12.5’s Tip Calculator app, we’ll discuss the Java code necessary to load and display an FXML GUI. Then, in Exercise 12.3, you’ll create the Java application that displays the Welcome GUI you build in this section. ...

Get Java How To Program, Late Objects, 11th Edition 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.