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

public class ellipseP1 extends JPanel
{
     public void paintComponent(Graphics g) {
	 super.paintComponent(g);
     Graphics2D g2=(Graphics2D)g;
     g2.setFont(new Font("Serif",Font.BOLD,24));	 
     g2.setColor(Color.BLUE);	
     this.setBackground(Color.YELLOW);	 
     g2.setStroke(new BasicStroke(3.0f)); 
     for(int x=100;x>=0;x-=20)
     {Ellipse2D xx=new Ellipse2D.Double(100-x,100-x,2*x,2*x);
     g2.draw(xx);}
    }
}

