Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • 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: 42969
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic