Java Applet Program to draw and fill Rectangle

Write a Java Applet program to draw and fill Rectangle.



Source Code
*/ 
import java.awt.*;
import java.applet.*;

/*
<applet code="DrawRectangles" width=300 height=200>
</applet>
*/
public class DrawRectangles extends Applet 
{
	public void paint(Graphics g) 
	{
		g.drawRect(10, 10, 60, 50);
		g.fillRect(100, 10, 60, 50);
		g.drawRoundRect(190, 10, 60, 50, 35, 35);
		g.fillRoundRect(70, 90, 140, 100, 40, 40);
	}
}
Output