ArrayList of PGraphics results in NullPointerException
              in 
             Programming Questions 
              •  
              6 months ago    
            
 
           - int screen_w = 640;
- int screen_h = 480;
- ArrayList<PGraphics> arrl = new ArrayList<PGraphics>();
- void setup(){
- size(screen_w,screen_h);
- background(255,255,255);
- arrl.add(createGraphics(screen_w,screen_h));
- }
- void draw(){
- image(arrl.get(0),0,0);
- }
I've tried replacing all PGraphics with PImage, and createGraphics(...) with createImage(...,RGB), and it gives me no problems.
 
              
              1  
            
 
            
 
 
          