code: private Graphics2D getGraphics(int layer) {
  		Graphics2D graphics = layeredGraphics[layer];
  		if (graphics == null) {
  			createImageAndGraphics(layer);
  			graphics = layeredGraphics[layer];
  		}
  		return graphics;
  	}
docs: Get the graphics for the layer index
  
  @param layer
  layer index
  @return graphics