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 paint(Graphics g) {
     Graphics2D g2=(Graphics2D)g;	 
     g2.setFont(new Font("Serif",Font.BOLD,24));	 
     g2.setColor(Color.red);
     g2.setStroke(new BasicStroke(2.0f));
     Ellipse2D x=new Ellipse2D.Double(50,50,500,200);
     g2.fill(x);
    }
}

