• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between waitForID and waitForAll methods

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I want to know what is the difference between waitForID() and waitForAll() methods of the MediaTracker class.

Tell me exactly what happens when we call one of these methods.
Whether does is download the images or not?

If possible give explaination of this with an example for clear idea.

regards,
Amit Joshi
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To learn exactly what MediaTracker does when you call its methods you can look up the methods in the MediaTracker api and read about them in the Method Detail section and/or look in the MediaTracker source code available in your sdk <JAVA_HOME>src/java/awt (after you unzip the src folder, of course).

I made up a small app to show what happens when you load with each method. You can experiment with it to learn how things work.

If you enjoy these things you can also experiment with the ImageObserver interface which is implemented by all Components. So all you need to do is override the imageUpdate method within your image–loading component and you have access to the loading process via flags described in the ImageObserver api.
 
reply
    Bookmark Topic Watch Topic
  • New Topic