Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts);
public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } }  if(!kill) { Runnable finalTask = new Runnable() { public void run() {
                        public void run()                        {                            Thumbnail[] ts = new Thumbnail[thumbnails.size()];                            thumbnails.toArray(ts);                            model.addThumbnails(ts);                            status.processSucceeded("All images loaded.");                        }