Chapter 6Using Images

Key Skills & Concepts

• Using an ImageView

• Loading images

• Loading an image placeholder

Chances are that if you are making an application with JavaFX, you will need to have some form of interaction with images. Even if your application is not directly related to images or image working, you may need a splash screen, a background, or even an image for a control.

This chapter teaches you how to work with images and load them into JavaFX. By the end of this chapter you will be able to add an image file to your project and load it to the screen. The first step in this process is to learn about the ImageView node.

The ImageView Node

Before you can display an image to the screen, you need to add an ImageView node to your application. ...

Get JavaFX A Beginners 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.