public BufferedImage createBufferedImage(String path){
        URL imgurl = getClass().getResource(path);
        if(imgurl!=null){
            try {
                return ImageIO.read(imgurl);
            } catch (IOException ex) {
                System.err.println("Could not find file1: "+path);
            }
        }else{
            System.err.println("Could not find file2: "+path);
            return null;
        }
        return null;
    }