code: public void paint (Graphics2D gfx, int layer, Shape clip)
      {
          for (int ii = 0, nn = _media.size(); ii < nn; ii++) {
              AbstractMedia media = _media.get(ii);
              int order = media.getRenderOrder();
              try {
                  if (((layer == ALL) || (layer == FRONT && order >= 0) ||
                       (layer == BACK && order < 0)) && clip.intersects(media.getBounds())) {
                      media.paint(gfx);
                  }
  
              } catch (Exception e) {
                  log.warning("Failed to render media", "media", media, e);
              }
          }
      }
docs: Renders all registered media in the given layer that intersect the supplied clipping
  rectangle to the given graphics context.
  
  @param layer the layer to render; one of {@link #FRONT}, {@link #BACK}, or {@link #ALL}.
  The front layer contains all animations with a positive render order; the back layer
  contains all animations with a negative render order; all, both.