code: public Image getSprite(int x, int y) {
  		target.init();
  		initImpl();
  
  		if ((x < 0) || (x >= subImages.length)) {
  			throw new RuntimeException("SubImage out of sheet bounds: "+x+","+y);
  		}
  		if ((y < 0) || (y >= subImages[0].length)) {
  			throw new RuntimeException("SubImage out of sheet bounds: "+x+","+y);
  		}
  
  		return target.getSubImage(x*(tw+spacing) + margin, y*(th+spacing) + margin,tw,th); 
  	}
docs: Get a sprite at a particular cell on the sprite sheet
  
  @param x The x position of the cell on the sprite sheet
  @param y The y position of the cell on the sprite sheet
  @return The single image from the sprite sheet