How does ImageGraphics work exactly?

I've got a texture that updates periodically and is drawn using ImageGraphics. This is done to make sure that only changed areas are updated. This is the code I use for updating:



       public void updateTextures(){
      Debugger.getDebugger().timestart(" Update textures (x2) ");

      System.out.print(".");
      defaultGraphics.update( defaultTexture );   
      System.out.print(".");
      radarGraphics.update( radarTexture );
      System.out.print(".");
      
      Debugger.getDebugger().timeend(" Update textures (x2) ");
   }



Most of the time, this stalls at:


defaultGraphics.update( defaultTexture );   



At other times (very, very, very sporadically) the updates work all the way through, but the texture is skewed.

How exactly does this all work, because I think I'm misunderstanding it.

Invoking it like this seems ok to me. What do you mean with 'stalls'? Does it work but it take a long time (how long)?



If you want to know how ImageGraphics works just have a look into the source code ;). For usage example see JMEDesktop (yes, that a big class, but it uses ImageGraphics only in a few lines).