Can't load image

So I need to make an app with two windows. I got this code online and it works but I cant load an image into it (the commented out part is mine). Any idea why the app freezes when I try to run it while loading an image?

class PWindow extends PApplet { // PImage[] subs = new PImage[2]; // String testKey="m"; PWindow() { super(); PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this);
}

void settings() { size(1920, 1080); }

void setup() { background(150); // subs[0]=loadImage("test.png"); }

void draw() { //if (keyPressed && key == testKey.charAt(0)){ // image(subs[0], 0,0); println("well it works"); //} }

void mousePressed() { println("mousePressed in secondary window"); } }

Sign In or Register to comment.