need some help setting up Void Setup / Draw

struggling to get my image loader code into a typical Setup/Draw:

import java.io.FilenameFilter;
File folder = dataFile("essentials");
ArrayList<PImage> imgAsset;


final FilenameFilter PIC_FILTER = new FilenameFilter() {
  final String[] exts = {
    ".png", ".jpg", ".jpeg", ".gif"
  };

  @ Override boolean accept(final File dir, String name) {
    name = name.toLowerCase();
    for (final String ext : exts)  if (name.endsWith(ext))  return true;
    return false;
  }
};

File[] pics = folder.listFiles(PIC_FILTER);
println("# of files found at folder above:", pics.length, ENTER);
printArray(pics);
println();



void setup() {

  size(1200, 1200);
  imageMode(CENTER);

  imgAsset = new ArrayList<PImage>();

  String[] filenames = new String[pics.length];



  for (int i = 0; i < pics.length; filenames[i] = pics[i++].getPath());


  //add to arraylist
  for (int i = 0; i < pics.length; i++) {
    PImage p = loadImage(filenames[i], "jpg");
    p.resize(round(random(width/2)), 0);
    imgAsset.add(p);
  };
};

void draw() {


  //place image on stage
  for (int i=0; i<30; i++) {
    image(imgAsset.get(round(random(pics.length-1))), ceil(random(height)), ceil(random(width)));
  }
  stop();
}
This discussion has been closed.