import java.awt.*;
import java.applet.*;
/*
<applet code=rect width=400 height=300>
</applet>
*/
public class rect extends Applet{
public void paint(Graphics g)
{
g.drawRect(50,60,50,40);
g.drawRoundRect(50,120,60,50,10,20);
g.fillRoundRect(120,60,60,50,15,20);
g.fillRect(120,120,60,60);
}
}
|
|

To demonstrate the use of draw oval and fill oval function. |
|
| |
|
|
|
|