Graphics g = null;
gamePanel.add(circle(g, 200, 100, 50, 50));
You are sending a
null
reference to the
circle
method, so there is no Graphics class to do the drawing. Also, the
circle
method does not return anything, so the
gamePanel.add
method has nothing to add.