I am trying to load an image using the lwjgl devil lib but it’s not working… And yes, I want to draw it on the swing component, is it possible?
IL.ilLoadImage(path);
int width = IL.ilGetInteger(IL.IL_IMAGE_WIDTH);
int height = IL.ilGetInteger(IL.IL_IMAGE_HEIGHT);
IL.ilConvertImage(IL.IL_RGB, IL.IL_BYTE);
ByteBuffer scratch = ByteBuffer.allocateDirect(width * height * 3);
IL.ilCopyPixels(0, 0, 0, width, height, 1, IL.IL_RGB, IL.IL_BYTE, scratch);
byte[] imageBuffer = new byte[scratch.limit()];
scratch.get(imageBuffer);
ImageIcon ii = new ImageIcon(imageBuffer);
Though imageBuffer contains some values and the image is loaded (i see the width) ii is not displayed 
Thanks in advance!
