JavaFX makes it easy to load and display images located locally or remotely using the Image API. The API offers two classes, Image and ImageView that work together to load and display the image respectively. The following code segment shows how to pull an image from Flickr and display it in an application:
When you compile and run the code above, you get an image-browser as shown below. Enter the URL of an image from Flickr, for instance, and press the "Get Image" button.