import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;

public class ovalP extends JPanel
{
int xi,yi,radius;

public ovalP(int xi1, int yi1,int radius1)
{
xi=xi1;
yi=yi1;
radius=(radius1 >= 0 ? radius1:10);
}

public void setOvalP(int xi1, int yi1,int radius1)
{
xi=xi1;
yi=yi1;
radius=(radius1 >= 0 ? radius1:10);
repaint();
}

public void paintComponent(Graphics g)
{
 super.paintComponent(g);
 g.setColor(Color.BLUE);
 Graphics2D g2=(Graphics2D)g;
 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
 Ellipse2D elips1=new Ellipse2D.Double(xi,yi,2.0*radius,radius);
 g2.fill(elips1);
}
}
