[ Ha-Nocri @ 31.05.2008. 16:20 ] @
Poz, Code: class Book { public static final ImageIcon DEGREE1 = new ImageIcon(Book.class.getResource("slike/degree1.png")); public static final ImageIcon DEGREE2 = new ImageIcon(Book.class.getResource("slike/degree2.png")); public static final ImageIcon DEGREE3 = new ImageIcon(Book.class.getResource("slike/degree3.png")); public static final ImageIcon DEGREE4 = new ImageIcon(Book.class.getResource("slike/degree4.png")); public static final ImageIcon DEGREE5 = new ImageIcon(Book.class.getResource("slike/degree5.png")); ...etc... } Metod getResource(fileName) baca NullPointerException ako datoteka nije pronadjena, a ja ne mogu da koristim try/catch blok ispred konstruktora izgleda. Kako da resim ovaj problem? Hvala unapred H |