Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

HELP: Using MediaTracker causes OutOfMemoryError

 
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.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • 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
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic