DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005

    Angry Applet not showing images


    I am writing an applet to play a little card game. Basically I have completed the applet and it works fine when i run it from console using the appletviewer. However, when I run it from a web page or from within my IDE (Forte for Java), only 2 images display in my game. The game still runs perfectly and I checked the Image objects and they are not null. They are just not showing up in the applet. I have tried many things to debug this and I have come to the conclusion that it has something to do with my .jpgs. Has anyone ever encountered this problem?? If so how do I fix it??? I can't play my game with only the 6 of clubs! lol. Note, I am trying to avoid posting code in here but I will if I have to, basically I'm like 99% sure it is not my code because I've been searching the net for 2 days looking for solutions to this and have modified my code many times to account for errors. Also, why would the six of clubs show if had something to do with my code? All the cards are loaded the same way. I believe it has something to do with the security on the .jpgs, only I dont know how the one card got away with it because all cards were created the same way. Any help would be greatly appreciated!

  2. #2
    Join Date
    Nov 2004
    This sounds like your code is a bit too hasty.... Are you using MediaTracker to wait
    for the images to load completely ? Running an applet from the console is not the
    same with respect to image load time as for running it as a "real" applet.
    And, an image object that isn't null, does not guarantee that this object is
    filled with pixels,

    PS. I use MediaTrackers for image load regardless if its local applications or applets.
    Last edited by sjalle; 04-18-2005 at 04:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.