• 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
Sheriff
Posts: 24215
37
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
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
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!