import java.io.*;
import java.applet.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.event.*;

public class graph2 extends JApplet  
{ 
  public void init()
  {      
  }

    public void paint(Graphics g) 
    {   Graphics2D g2 = (Graphics2D)g;
        g2.setPaint(Color.blue);
        Ellipse2D elips1=new Ellipse2D.Double(55,55,90,30);
        g2.fill(elips1);
        g2.setPaint(Color.black);
        Ellipse2D elips2=new Ellipse2D.Double(50,50,100,40);
        g2.draw(elips2);
        g2.setPaint(Color.black);
        Ellipse2D elips3=new Ellipse2D.Double(50,150,100,40);
        g2.draw(elips3);
        GradientPaint kirmizidanbeyaza=new GradientPaint(250,50,Color.red,350,90,Color.white);
        g2.setPaint(kirmizidanbeyaza);
        Ellipse2D elips4=new Ellipse2D.Double(250,50,100,40);
        g2.fill(elips4);
        GradientPaint kirmizidanmaviye=new GradientPaint(250,150,Color.red,350,190,Color.blue);
        g2.setPaint(kirmizidanmaviye);
        Ellipse2D elips5=new Ellipse2D.Double(250,150,100,40);
        g2.fill(elips5);
        g2.setPaint(Color.black);
        g2.draw(elips5);
    }

    public static void main(String s[])
    {
        JFrame f = new JFrame("Grafik ekran genel programę");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });
        JApplet applet = new graph2();
        f.getContentPane().add("Center", applet);
        applet.init();
        f.pack();
        f.setSize(new Dimension(800,400));
        f.setVisible(true);        
    }
}





