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

Program to draw Arc in Applet using drawArc() method in Java

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

// Program to draw Arc in Applet using drawArc() method.

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

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

public class DrawArcTest1a extends Applet  
{
public void paint(Graphics g) 
{
 setBackground( Color.yellow );
 g.drawArc(20, 20, 160, 60, 90, 180);  
}
}

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