org/homelinux/largo/utils/ImgComponent.java
changeset 7 93fe1f21e0d8
parent 0 e0dbaef72362
child 13 f83884cc7d2f
equal deleted inserted replaced
6:ad18534e08fd 7:93fe1f21e0d8
     7 
     7 
     8 import javax.swing.ImageIcon;
     8 import javax.swing.ImageIcon;
     9 
     9 
    10 public class ImgComponent extends Canvas {
    10 public class ImgComponent extends Canvas {
    11 	static final long serialVersionUID = 140208;
    11 	static final long serialVersionUID = 140208;
    12 	private Image img = null;
    12 	private Image img;
    13 
    13 
    14 	public ImgComponent (String sFile) {
    14 	public ImgComponent (String sFile) {
    15 		ClassLoader cl = getClass ().getClassLoader ();
    15 		ClassLoader cl = getClass ().getClassLoader ();
    16 		URL url = cl.getResource (sFile);
    16 		URL url = cl.getResource (sFile);
    17 		img = new ImageIcon (url).getImage ();
    17 		img = new ImageIcon (url).getImage ();