This applet will get you started. It has code to insert to a tree, to paint a tree, and to pick nodes in the tree with the mouse. You add the code to rotate or double rotate the node picked.
The following applet is a partially implemented version of your final program. I have single rotate working, but still haven't got the double rotate code yet.