if (!active) {
if (!imageDisplay) {
     void setImage(BufferedImage img)     {        if (!active) {             int w = img.getWidth()+2*START, h = img.getHeight()+2*START;            setSizePaintedComponents(new Dimension(w, h));            w += 2*START;            h += 2*START;            setWindowSize(w, h);        }        canvas.paintImage(img);        active = true;     }