File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getImage Problem

 
Adrian Muscalu
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
ricky gonzalez
Ranch Hand
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This depends on the connection speed obviously.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using a MediaTracker for loading images.
Regds.
Rahul
 
paul wheaton
Trailboss
Pie
Posts: 21183
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to the applets forum
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic