Draw Arc in java applet

Hello Friends, 

Today I will explain how can we draw Arc in java applet.
In this  program I have print simple Arc but you can draw different shapes with different size.
    import java.applet.*;
import java.awt.*;
import java.awt.event.*;

/*


*/

public class Arcdemo extends Applet
{
public void paint(Graphics g)
{
g.drawArc(150,60,100,100,0,90);
g.setColor(Color.blue);
g.fillArc(100,60,45,60,0,90);
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *