private Image createImage(String path, String description) {
        URL imageURL = Main.class.getResource(path);

        if (imageURL == null) {
            System.err.println("Resource not found: " + imageURL);
            return null;
        } else {
            return (new ImageIcon(imageURL, description)).getImage();
        }
    }