• Post Reply Bookmark Topic Watch Topic
  • New Topic

To load the image in Applet

 
Shiva Mohan
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keith,
I tried using MediaTracker.But still it gives NullPointerException error.I couldn�t figure out where I am making mistake.It would be nice,if you help me with that.

Here is my code:


[ UD: added CODE tags ]
[ January 08, 2006: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code doesn't actually wait until the MediaTracker signals that it has loaded the images; that's a crucial part of using a tracker. The javadocs for MediaTracker have an example of how to do that.

As a side note, next time you post code, use the code tags to keep it nicely formatted and readable. It makes understanding the ocde much easier. The tags are accessed through the "CODE" button beneath the text entry box during posting. I have added them to this post for you.
 
Shiva Mohan
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.Next time,i will follow the CODE tags.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!