This is what I learned after the mess a few hours later.
I used the slick-util lib library.
Display.setIcon(new ByteBuffer[] { new ImageIOImageData().imageToByteBuffer(ImageIO.read(new File("res/game/gameIcon.png")), false, false, null), new ImageIOImageData().imageToByteBuffer(ImageIO.read(new File("res/game/gameIcon.png")), false, false, null) });
source share