Oval

Here I am again to ask question.

If there any way that I can assign a drawn Oval in a variable?

If in rectangle, you can do like this:

Rectangle rect = new Rectangle(0, 0, 100, 50);

How about in Oval?

Is this the only way?

public void drawOval(Graphics2D g2d) {
        g2d.setColor(Color.RED);
        g2d.fillOval(x, y, DIAMETER, DIAMETER);
    }

I tried to search in Google but couldn`t find anything.

Thank for your help.

http://docs.oracle.com/javase/7/docs/api/java/awt/geom/Ellipse2D.html

Found that in about 2 minutes…

Oh. .I didn`t know the right keyword.

Thank you very much.