public static Image loadImage(String resource) {
        try {
            return ImageIO.read(ClassLoader.getSystemClassLoader().getResource(resource));
        } catch (IOException e) {
            System.err.println("Exception: " + e.getMessage());
            System.exit(-1);
        };
        return null;
    }