This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hello there, Now I seem to be having a real strange problem. I have an applet with is has 4 images all of which I am loading together, when I mean loading I mean getting the images into an image object. The problem occurs when the applet is loaded for the first time. One of these images dont seem to come up everytime. For some strange reason when the repaint method is called on click of a reset button, this missing image appears. Could anybody help me stop pulling my hair as to why this irational behaviour. Thks, Jack
It's actually not irrational behavior, but it sure can seem that way when experienced for the first time. Take a look at java.awt.MediaTracker and see if you don't get an idea as to what's going on and how you can better control the display of your images.
Gee thanks mate, this sure works fine now. Just one thought baffling though is as to why out of the 4 images it was always a particular one that was bumming up. Checked the fact that all my images were of the same size, width and height. Could there be any specific reason cos thought it works perfect, i am still curious as to why this happens. jack
Joined: Jan 11, 2001
hi there, i must be going blind, guess what my code already did have the media tracker somewhere in that big spagetti code that i had to debug and guess which images was missing to be added to the media tracker. - the cancel button. now this solves my problem completely. Thanks dirk. Jack