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
History,
23 days ago
Social Sciences,
23 days ago
Science,
1 month ago
Computer Science,
1 month ago
Math,
9 months ago
Chemistry,
9 months ago