Hi, i have a question regarding the Downloads of the Applet . The jar size of the applet is around 38 kb and along with this i have to download 20 images hence because of this applet takes along time to download . Can anyone suggest me some way so that i can reduce the download time .Well there would be some way thru which i can download all the images in one single connection
hi , Thanks for taking out time , Ok but can u put fwd me the code how u are going to access the images thru the jar Foramat because while creating the Image object we have to specify the path where the files are stored . wat about that? Can u exactly how r u going to download the image file by keeping them in the Jar Format with an example (i mean by writing a code )
The getCodeBase() method is used to get the handle that allows you to reference the downloaded image. This is pretty basic stuff that can be found in most into Java books. I use the O'Reilly "Java Examples in a Nutshell". [This message has been edited by Tim Holloway (edited August 03, 2001).]
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
hi , it seems u didntget my question while downloading the image the following procedure is normally employed Image img = getImage(getCodeBase(),"image/name.gif" ) MediaTracker md = new MediaTracker(this); md.add(img,1); try { md.waitFor(1) ; } catch (Exception e) { } so now the Question is if i am putting it in the Jar format wat will be my code and how am i going to refer to the image file name .gif in the getImage method
Where MyClass is the name of the class this code is in, and "abc.gif" is the filename of your image... Then you can put this image through the MediaTracker!
HTH, -Nate [This message has been edited by Nathan Pruett (edited August 03, 2001).]
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Gift giving made easy with the permaculture playing cards