aakash2310

Ovalpar

Mar 8th, 2022
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import java.applet.*;
  2. import java.awt.*;
  3. public class Ovalpar extends Applet
  4. {
  5.     int w,h;
  6.     public void init()
  7.     {
  8.         setBackground(Color.cyan);
  9.         setForeground(Color.red);
  10.     }
  11.     public void start()
  12.     {
  13.         w = Integer.valueOf(getParameter("OvalWidth"));
  14.         h = Integer.valueOf(getParameter("OvalHeight"));
  15.     }
  16.     public void paint(Graphics g)
  17.     {
  18.         g.drawOval(50,20,w,h);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment