code: public void paintMedia (Graphics2D gfx, int layer, Rectangle dirty)
      {
          if (layer == FRONT) {
              _spritemgr.paint(gfx, layer, dirty);
              _animmgr.paint(gfx, layer, dirty);
          } else {
              _animmgr.paint(gfx, layer, dirty);
              _spritemgr.paint(gfx, layer, dirty);
          }
      }
docs: Renders the sprites and animations that intersect the supplied dirty region in the specified
  layer.