File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes getImage Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "getImage Problem" Watch "getImage Problem" New topic
Author

getImage Problem

Adrian Muscalu
Ranch Hand

Joined: May 08, 2000
Posts: 73
Hello everybody,
What I'm trying to do is to load an image situated "across the wire", on the server side, from my signed applet.
My problem is that the following line takes to long to execute:
Toolkit.getDefaultToolkit().getImage("http://....../myImage.jpg");
If I have only one image to load, everything works fine. Instead, if I load more than 5 images (in a FOR cycle), the first is loaded, maybe the second one but the rest comes after a long time. Sometimes even 10 images are loaded very quickly; I'm confused. This process is depending on what?
All my images have about 4-5K, therefore I refuse to believe that the size is a problem. My RAM Memory is 64MB.
One more thing. If I refresh the browser page (IE), is seems to unlock the process and show some more loaded images

If possible, please reply.
Thank you for your cooperation,
Ady

SCJP2, SCWCD
ricky gonzalez
Ranch Hand

Joined: Jun 30, 2000
Posts: 167
Hi, I just read something about this. The problem is that you are loading images from the Internet, if you can put those images in a .jar file that would be fast to load.
ricky gonzalez
Ranch Hand

Joined: Jun 30, 2000
Posts: 167
This depends on the connection speed obviously.
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1859
Try using a MediaTracker for loading images.
Regds.
Rahul
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20729
    ∞

I'm moving this to the applets forum


permaculture Wood Burning Stoves 2.0 - 4-DVD set
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getImage Problem