gl.glColor4f(1f, 1f, 1f, 0.5f);
// vertical line
gl.glVertex2d(centerX - halfWidth, centerY + halfHeight);
gl.glVertex2d(centerX + halfWidth, centerY + halfHeight);
gl.glVertex2d(centerX + halfWidth, centerY - halfHeight);
gl.glVertex2d(centerX - halfWidth, centerY - halfHeight);
// left part of horizontal line
gl.glVertex2d(centerX - halfHeight, centerY + halfWidth);
gl.glVertex2d(centerX - halfWidth, centerY + halfWidth);
gl.glVertex2d(centerX - halfWidth, centerY - halfWidth);
gl.glVertex2d(centerX - halfHeight, centerY - halfWidth);