O'Reilly logo

JavaFX 1.2 Application Development Cookbook by Vladimir Vivien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading multiple images dynamically

In Chapter 5, JavaFX Media, we have seen how to load a single image from a given location. However, in certain situations (think of game development, or dynamically building a GUI), you will find it necessary to load multiple images into your application. If you are loading three or four images, then there are no issues. If however you have, say, 30 or 100 images to load on the scene graph, that will definitely be a motivator to find an easy way to load them (yes, good developers are lazy and will look for ways to keep things simple, repeatable, and efficient).

This recipe shows you how to load multiple images into your application easily, and make them available for programmatic manipulation and display. Although ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required