• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Checking Loading of image

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,


Image img=Toolkit.getDefaultToolkit().getImage("D:/Images/sd.img");
Image img1=Toolkit.getDefaultToolkit().getImage("D:/Images/sd1.img");
Image img2=Toolkit.getDefaultToolkit().getImage("D:/Images/sd2.img");
MediaTracker track=new MediaTracker();
track.addImage(img);
track.addImage(img1);
track.addImage(img2);
try
{
track.waitForID(img);
track.waitForID(img1);
track.waitForID(img2);
}catch(Exception e){}

Loaded images using Mediatracker(java.awt.MediaTracker)

For checking whether the image are loaded i have used ie for eg: track.checkID(img)

is there any other to check whether image(particular image say img,img1) are loaded apart
from track.checkID(Id),track.checkID(id,true/false).

Regards
Kirba.
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic