   [java] Problem with drawImage
  I have tried loading Images into my applet many different ways.- java.awt.Toolkit.getDefaultToolkit().createImage("box.jpg");- getImage(getDocumentBase(), "box.jpg");- new ImageIcon("box.jpg").getImage()The only thing that actually ends ups loading is getImage(getDocumentBase...)Any clue as of why the other methods are not working at all? I have also tried loading in different types of images.I am trying to draw each one with g.drawImage(box, 0, 0, this) and with the ImageObserver being null, but still only the image loaded by getImage works.   
  When you load an image in an applet like that the method returns immediately while continuing to load in the background.  Since the image is not yet loaded it will not draw yet.  You have 2 options.  Use the MediaTracker class to track when the image is done loading or use ImageIO which blocks until the image is loaded.   ;  Alright, I think I fixed it now. Thank you =)   