// DrawOval.java
// Draws an oval on the applet window
// whose dimension and location are specified by the user
import java.awt.Graphics;
import javax.swing.JApplet;
import javax.swing.JOptionPane;

public class DrawOval extends JApplet 
{
   int upperLeftX;
   int upperLeftY;
   int width;
   int height; 

   // obtain rectangle dimensions and coordinates from user
   public void init()
   {
      // string entered by user
      String inputString;

      // read upper left x- coordinate from user as a String
      inputString = JOptionPane.showInputDialog( "Enter upper left X :" );
      upperLeftX = Integer.parseInt( inputString );

      // read upper left y-coordinate from user as a String
     
      // read width from user as a string
     

      // read height from user as a string
      
   } // end method init

   // draw the new oval
   public void paint( Graphics g )
   {
      g.drawOval( upperLeftX, upperLeftY, width, height );
   } // end method paint
} // end class DrawOval
