what to send as first parameter for paint
There is a paint() method define in the JFrame class. If you intend to override that method, you need to code its definition the same as the definition in the class. See the API
doc for JFrame.
The JFrame's paint() method is automatically called by the JVM and passed a Graphics object when changes are made to the GUI that need to be redrawn and after the repaint() method is called. Normally code doing custom drawing overrides the paint() method.
If you want to define your own method to do the drawing,
you should give it a different name and you will be required to call it to have it be executed.
See the tutorial about custom painting:
http://docs.oracle.com/javase/tutorial/uiswing/painting/index.html