25.4 Welcome App—Displaying Text and an Image

In this section, without writing any code you’ll build a JavaFX Welcome app that displays text in a Label and an image in an ImageView (Fig. 25.2). First, you’ll create a JavaFX app project in the NetBeans IDE. Then, you’ll use visual-programming techniques and JavaFX Scene Builder to drag-and-drop JavaFX components onto the design area. Next, you’ll use JavaFX Scene Builder’s Inspector window to configure options, such as the Labels’s text and font size, and the ImageView’s image. Finally, you’ll execute the app from NetBeans. This section assumes that you’ve read the Before You Begin section, and installed NetBeans and Scene Builder. We used NetBeans 7.4, Scene Builder 1.1 and Java SE 7 for this ...

Get Java™ How To Program (Early Objects), Tenth 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.