What kind of graphics context and/or image are you using? IIRC, the OpenGL graphics context may not flush image modifications until the Graphics instance itself is destroyed (more details here). In that case, reusing a Graphics instance across multiple paint calls won’t produce the expected results, because the instance is not destroyed after rendering to the image.
Other renderers might do something similar. To see whether this is the problem, you could try creating a Graphics instance that is local to the function, and that is destroyed before calling g.drawImageAt.