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

HELP: Using MediaTracker causes OutOfMemoryError

 
K Duke
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone:
I am trying to create a simple JApplet animation sequence using (about) 129 JPEG images. I am using a MediaTracker object to keep track of image loading.
--------------------------------------------------------------

-------------------------------------------------------------------
After adding all images to a Mediatracker object, I call the waitForAll() method to ensure all images are loaded before I call paint. I am using a Swing Timer object that fires every 100 ms, and calls repaint(). Decreasing the number of images to 10 or so obviously prevents the OutOfMemoryError.
However, I MUST to be able to load all 129 images before I render the animation sequence.
Any suggestions? Thanks in advance.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first off, how big are the images?
 
K Duke
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first off, how big are the images?

Around 70KB each.
I m trying to view the applet using IE browser. I was thinking of increasing the Java VM heap size, but not sure how to do that for IE.
Any suggestions welcome.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic