import java.awt.Graphics;

import javax.swing.JFrame;

public class Frame extends JFrame 
{
  
  Figure myFigure1 = new BorderDecorator(new Oval(50, 50, 100, 50));
  
  public Frame() {
    try 
	  {
      this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }

  public static void main(String[] args) 
  {
    Frame frame1 = new Frame();
    frame1.setBounds(0, 0, 200, 200);
	  frame1.setLocation(200, 200);
    frame1.setVisible(true);
  }
  
  public void paint(Graphics g)
  {	  	
		myFigure1.draw(g);
  }

}