equal
deleted
inserted
replaced
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 (); |