How to apply texture to objects rendered using index buffers?

So basically I can render any mesh from Softimage XSI exported to dotxsi by using index buffers. But now my question is how do I apply a texture to these objects. The dotxsi file has 2D coords for a texture (if it has been applied in XSI), I can parse it by my self but I just need the correct commands for JOGL to render the textures. Here is my draw function code:

	public void display(final GLAutoDrawable drawable)
	{
		gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
		gl.glLoadIdentity();
		
		glu.gluLookAt(m_x_displ, 0, 10, 0, 0, 0, 0, 1, 0);
		
		gl.glRotated(m_quad_angle, 1, 0, 0);

		gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
		gl.glCullFace(GL.GL_BACK);
		gl.glEnable(GL.GL_CULL_FACE);
		
		gl.glVertexPointer(3, GL.GL_FLOAT, 0, vaVertices);
		gl.glDrawElements(GL.GL_TRIANGLES, m_indices.length, GL.GL_UNSIGNED_INT, vaIndices);

		if( (++m_quad_angle) > 360.0 )
			m_quad_angle = 0.0;
	}

It seems like all of the OGL texture tutorials on the net don’t use index buffers (which I think is not a very efficient way to draw objects), so if you can please show me how to use textures with index buffers. Thanks very much.

just load a TextureIO as u would normally do, getTextureObject() and bind texture as usual…

  Texture tex = TextureIO.newTexture( new File(dataPath(fileName)), true );
int id = tex.getTextureObject();


gl.glBindTexture( GL.GL_TEXTURE_2D, id );