glDrawArrays

I can’t seem to get glDrawArrays to work. I believe the process is to create a directed buffer, put the data in, enable GL_VERTEX_ARRAY, bind the buffer with glVertexPointer, and call glDrawArrays. I attempt to render a few points on the screen but no matter what my data is, it always renders the point at 0, 0, 0, Here is some sample code:

float[] data = {0, 0, 0, 100, 100, 100, 100, 100, 0};
java.nio.FloatBuffer buffer = java.nio.ByteBuffer.allocateDirect(4 * data.length).asFloatBuffer();

buffer.put(data);

gl.glPointSize(10);
gl.glColor3f(1, 0, 0);
gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
gl.glVertexPointer(3, GL.GL_FLOAT, 0, buffer);
gl.glDrawArrays(GL.GL_POINTS, 0, data.length);
gl.glDisableClientState(GL.GL_VERTEX_ARRAY);

What am I doing wrong??!!

You need to specify the order of the buffer:
java.nio.FloatBuffer buffer = java.nio.ByteBuffer.allocateDirect(4 * data.length).order(ByteOrder.nativeOrder()).asFloatBuffer();.