code: public Cursor getAnimatedCursor(String ref,int x,int y, int width, int height, int[] cursorDelays) throws IOException, LWJGLException {
  		IntBuffer cursorDelaysBuffer = ByteBuffer.allocateDirect(cursorDelays.length*4).order(ByteOrder.nativeOrder()).asIntBuffer();
  		for (int i=0;i<cursorDelays.length;i++) {
  			cursorDelaysBuffer.put(cursorDelays[i]);
  		}
  		cursorDelaysBuffer.flip();
  
  		LoadableImageData imageData = new TGAImageData();
  		ByteBuffer buf = imageData.loadImage(ResourceLoader.getResourceAsStream(ref), false, null);
  					
  		return new Cursor(width, height, x, y, cursorDelays.length, buf.asIntBuffer(), cursorDelaysBuffer);
  	}
docs: Get a cursor based on a image reference on the classpath. The image
  is assumed to be a set/strip of cursor animation frames running from top to
  bottom.
  
  @param ref The reference to the image to be loaded
  @param x The x-coordinate of the cursor hotspot (left -> right)
  @param y The y-coordinate of the cursor hotspot (bottom -> top)
  @param width The x width of the cursor
  @param height The y height of the cursor
  @param cursorDelays image delays between changing frames in animation
  
  @return The created cursor
  @throws IOException Indicates a failure to load the image
  @throws LWJGLException Indicates a failure to create the hardware cursor