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

public class ellipseP 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.RED);
     this.setBackground(new Color(255,255,255));
     float dash3[] = {10.0f,3.0f,3.0f};
     BasicStroke d3 = new BasicStroke(3.0f,BasicStroke.CAP_BUTT, 
                                                      BasicStroke.JOIN_MITER, 
                                                      3.0f, dash3, 2.0f);
     g2.setStroke(d3);
     Ellipse2D x=new Ellipse2D.Double(50,50,500,200);
     g2.draw(x);
    }
}

