Can you help me ,how does the rotation of the gear implement?(I'am Chinese)

This is the source of the demo on the jogl website, I have studied it for a lot of time ; but still have many questions about it . (English is poor, say sorry first)

The code source is in the attched text.

The questions are these below:
1,How does the rotation of the gears implement in the code?
2,I haven’t seen the revoking of the function of reshape(), when does it be revoked?
3,Can you explain the details of the dimeson of the GLCanvas in the jogl?
4,I once saw the user-guider of jogl ,it say that the init () is to revoke when setting the environments of the redering, and display() is to implement some detailed jobs of redering ,such as redering the picture,and reshape() is to revoked when some circumstance is changed, but I still have doubts.Can you teel me the sequence of these three functions to be revoked?

Thank you very much!

I think the word you are looking for is “Invoked” not “Revoked”

Here’s some answers:
1 - calls to gl.glRotatef will change the model view matrix, any vertices drawn will be translated by that matrix, thus they will get rotated. When the display list is called, all of the vertices it draws will be translated.
2 - Reshape is called by JOGL when the window is resized
3 - The call frame.setSize(300, 300); sets the dimensions
4 - Init is called so you can setup your environment. Display is called when you should do your rendering calls and reshape is called so you can adjust things to the new size of the window if the user has changed it