Write an applet to demonstrate drawRect() and fillRect() method

0
657
Want create site? Find Free WordPress Themes and plugins.
 /*Write an applet to demonstrate drawRect() and fillRect() method.*/
import java.awt.*;
import java.applet.*;
/*
<applet code="A.class" width=400 height=450></applet>
*/
public class ass5_8 extends Applet
{
public void paint(Graphics g)
{	
int a[]={10,100,100,10};
int b[]={10,10,60,60};
g.drawPolygon(a,b,4);
int c[]={110,200,200,110};
int d[]={10,10,60,60};
g.setColor(Color.blue);
g.fillPolygon(c,d,4);
}
}
Did you find apk for android? You can find new Free Android Games and apps.

LEAVE A REPLY