Write applets to draw circle inside a square
Answers
Answered by
2
Answer: Program given below.
Explanation:
import java.awt.*;
import java.applet.*;
public class Shapes extends Applet
{
public void paint(Graphics g)
{
g.drawString("Circle Inside a Squar",290,110);
g.drawRect(290,10,80,80);
g.drawOval(290,10,80,80);
}
}
#SPJ2
Answered by
2
The required program is written below:
import java.awt.*;
import java.applet.*;
public class Shapes extends Applet
{
public void paint(Graphics g)
{
g.drawString("Circle Inside a Squar",290,110);
g.drawRect(290,10,80,80);
g.drawOval(290,10,80,80);
}
}
Hence, this is how we write applets to draw a circle inside a square.
#SPJ2
Similar questions