Problème de chargement de ressource
Bonjour,
Mon applet ne veut pas charger mes images.
Lorsque je la lance avec appletviewer, mon appli marche nickel.
Lorsque je la lance avec ie, elle ne trouve plus mes images chargées de la facon suivante :
Code:
1 2
|
URL u = getClass().getResource(pathImage); |
L'erreur suivante survient :
Code:
1 2 3 4 5 6 7 8 9
|
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at bt.Bouton.addIdImage(Bouton.java:122)
at bt.FenetreLancement.<init>(FenetreLancement.java:58)
at bt.Cti.main(Cti.java:27)
at bt.My_Applet.init(My_Applet.java:9)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) |
Merci de votre aide.