code: private void drawRect(Color color, int startX, int startY, int width,
  			int height) {
  		assert color != null;
  		for (int x = startX; x < startX + width; x++) {
  			for (int y = startY; y < startY + height; y++) {
  				try {
  					image.setRGB(x, y, color.getRGB());
  				} catch (ArrayIndexOutOfBoundsException e) {
  					logger.warn("tried to set x/y = " + x + "/" + y);
  				}
  			}
  		}
  	}
docs: Draws a rectangle.
  
  @param color
  that fills the rectangle
  @param startX
  the x value of the upper left corner for the rectangle
  @param startY
  the y value of the upper left corner for the rectangle
  @param width
  the width of the rectangle in pixels
  @param height
  the height of the rectangle in pixels