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

 public class OvalIcon implements Icon
 {
  int genislik, yukseklik;

  public OvalIcon(int w,int h)
  {
  genislik=w;
  yukseklik=h;
  }
  public void paintIcon(Component c,Graphics g,int x,int y)
  {
  Graphics2D g2=(Graphics2D)g;
  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
  RenderingHints.VALUE_ANTIALIAS_ON);
  Ellipse2D elips1=new Ellipse2D.Double(x,y,genislik-1,yukseklik-1);
  g2.draw(elips1);
  }
  public int getIconWidth() {return genislik;}
  public int getIconHeight() {return yukseklik;}
}

