/*
 * Created on 06.05.2004 21:16:24
 *
 * Multimediale Algorithmen und Datenstrukturen Assessments
 */
package mauda.images;

import javax.swing.*;
/**
 * Handles used Images (necessary for use in JAR-Files)
 * 
 * @author Markus Krebs
 */
public class ImageHandler {

	/**
	 * 
	 */
	public ImageHandler() {
		super();
	}

	
	/**
	 * Creates an ImageIcon from the specified path relative to the
	 * package mauda.images
	 * @param path The name of the Image
	 * @return ImageIcon
	 */
	public static ImageIcon createImageIcon(String path) {
		java.net.URL imgURL = ImageHandler.class.getResource(path);
		if (imgURL != null) {
			return new ImageIcon(imgURL);
		} else {
			System.err.println("Couldn't find file: " + path);
			return null;
		}
	}

}
