The quad's center is the position (0, 0, 0) in local space. Local space is the space in which you define your vertex positions.
For instance, if you draw your quad using the opengl glvertex* commands, you should specify each vertex relative to (0, 0, 0):
glBegin(GL_QUADS); // Draw A Quad
glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left
glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glEnd(); // Done Drawing The Quad
The code was taken from the NeHe website: Your First Polygon
If you draw your quad like this, each rotate command will rotate the quad around it's center. That's because the rotation matrix will be multiplied with each vertex position, which will result in the vertex being rotated around (0, 0, 0).
You should have a look at the NeHe article, it's a good starting point. Also have a look at the other articles there: http://nehe.gamedev.net/tutorial/lessons_01__05/22004/ ( there's one dealing with rotations in particular ).
EDIT:
You're drawing the quad relative to the lower left corner, so in order to match the center of the quad with the object space origin, you should first translate it by ( -width()/2, -height()/2, 0 ). Keeping in mind that matrices are multiplied in the reverse order, I would try something like:
GL11.glTranslatef(x+getWidth()/2, y+getHeight()/2, 0); // M1 - 2nd translation
GL11.glRotatef(30, 0.0f, 0.0f, 1.0f); // M2
GL11.glTranslatef( -getWidth()/2, -getHeight()/2, 0); // M3 - 1st translation
Matrices are multiplied in order, and then multiplied on the left side with the vertex. So the resulting formula would be M1 * M2 * M3 * V. Notice that V is first multiplied by M3, so that's the matrix we use to translate the quad into the origin.
GL11.glTranslatef(-(x-getWidth()/2), -(y-getHeight()/2), 0);– Michael Slade Nov 16 '12 at 13:44GL11.glTranslatef(-x-getWidth()/2, -y-getHeight()/2, 0);– AranHase Nov 16 '12 at 15:10