private void registerAllImages() {
    name2Image = new Hashtable<String,Image>();

    MediaTracker tracker = new MediaTracker(aComponent);

    try {
      java.net.URL _url = getClass().getResource(RESOURCE_PATH);
      if ( _url == null ) {
        throw new RuntimeException("ImageManager: URL/folder '"+
                                   RESOURCE_PATH+
                                   "' does not exist.");
      }
      // Convert URL to a File (from Kohsuke Kawaguchi's Blog)
      File dir;
      try {
        dir = new File(_url.toURI());
      } catch(URISyntaxException e) {
        dir = new File(_url.getPath());
      }
      // create a filter to find .GIF files.
      FilenameFilter filter = new FilenameFilter() {
        public boolean accept(File dir, String name) {
            return name.endsWith(".gif") || name.endsWith(".GIF");
        }
      };
      // Retrieve array of gif file names in resource folder
      String[] gifFileArray = dir.list(filter);
      for ( String s : gifFileArray ) {
        // Load and register the image
        Image img = _registerIn(s);
        if ( img == null ) {
          throw new 
            RuntimeException("ImageManager: Did not find image named "+
                             s );
        }
        tracker.addImage( img, 7 /* not used so why not 7 */ );
        String filenameNoExtension = s.substring(0, s.length()-4);
        name2Image.put( filenameNoExtension, img );        
      }
      // block until all images are loaded
      try {
        tracker.waitForAll();
      } catch (Exception e) {}
    } catch (Exception e) {
      throw new RuntimeException( "Exception caught "+e);
    }
  }