Need to add graphics2D
argument to ring()
method like this:
public void ring(int x , int y , String color, graphics2D g2) {
Ellipse2D.Double circle = new Ellipse2D.Double( x , y ,100,100);
g2.setPaint(Color.getColor(color));
g2.draw(circle);
}
and call ring()
with the graphics2D
argument:
ring(10 , 20 , "Blue", g2);
I think that should work.