You are here: Home / Topics / Program to draw oval in Applet using fillOval() method in Java

Program to draw oval in Applet using fillOval() method in Java

Filed under: Java on 2023-10-16 07:05:11

//  Program to draw oval in Applet using fillOval() method.

import java.awt.*;
import java.applet.*;

/*
<applet code="FillOvalTest1a" width="200" height="100" >
</applet>
*/

public class FillOvalTest1a  extends  Applet  
{
public void paint(Graphics g) 
{
 setBackground( Color.yellow );
 g.fillOval (20, 20, 160, 60);  
}
}

About Author:
J
Java     View Profile
Hi, I am using MCQ Buddy. I love to share content on this website.