|
Hi,
You have to use URL format to load your image
file, so you can not use directly the file name in applet, which is just valid
in application. And the path is specified with the class file. I give
the example as follows:
java.net.URL urlimage = new
java.net.URL(getCodeBase().toString() + "image.jpg");
where, the image file "image.jpg" is same
subdirectory with you applet class file. Additionaly, all image files must be
set to read attribute.
Rgds,
Cheng Chang Dong
|
- [JAVA3D] problems with win2k server and loading files Darren Vollmer
- Cheng Chang Dong
