Animated Cursor Problem?

just having a small problem, i’m trying to setup a animated cursor using the lwjgl Cursor class, i have gotten it to work nicley with a single image using the following code

public Cursor getCursor(String ref,int x,int y) throws IOException, LWJGLException {
		ByteBuffer buf = TextureLoader.loadImage(ResourceLoader.getResourceAsStream(ref), false);
		
		return new Cursor(TGALoader.getLastWidth(), TGALoader.getLastHeight(), x, y, 1, buf.asIntBuffer(), null);
	}

however i’m not quiet sure how to send it multiple images as an IntBuffer, any idea’s thx.

check the HWCursorTest in the src:

// Create a 20 piece animation
		// ==================================
		cursorImageCount = 20;
		cursorImages = ByteBuffer.allocateDirect(cursorWidth*cursorHeight*cursorImageCount*4).order(ByteOrder.nativeOrder()).asIntBuffer();
		cursorDelays = ByteBuffer.allocateDirect(cursorImageCount*4).order(ByteOrder.nativeOrder()).asIntBuffer();
		cursorDelays.put(
										 new int[] { 
										 		100, 100, 100, 100, 100,
												100, 100, 100, 100, 100,
												100, 100, 100, 100, 100,
												100, 100, 100, 100, 100
										 });
		
		float step = 0xffffffff / 20.0f;
		for(int i=0; i<cursorImageCount; i++) {
			for(int j=0; j<cursorWidth; j++) {
				for(int l=0; l<cursorHeight; l++) {
					cursorImages.put((int)step);
				}
			}
			step += step;
		}
		cursorImages.flip();
		cursorDelays.flip();
		cursor[2] = new Cursor(Cursor.getMaxCursorSize(), Cursor.getMaxCursorSize(), Cursor.getMaxCursorSize()/2, Cursor.getMaxCursorSize()/2, cursorImageCount, cursorImages, cursorDelays);      
		// ----------------------------------