The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Getting Loaded

Posted by Matt Gerrans on November 28, 2001 at 3:49 PM

> One approach that should make for a more responsive user experience is to load all of the images at startup. Make an image cache based off of an array or map. Load each of the images with Toolkit.createImage() at startup, then get each of the Image objects from your cache as needed.

Additionally, if you do this in a separate thread, the user doesn't have to sit and wait 'til they are all loaded before the user interface "comes to life." You might use a ProgressMonitor, or JProgressBar to indicate the progress of the loading, as well.

- mfg


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us