Write an applet to demonstrate drawPolygon() and drawPloyline() method

0
791
Want create site? Find Free WordPress Themes and plugins.
 /*Write an applet to demonstrate drawPolygon() and drawPloyline() method.*/
import java.awt.*;
import java.applet.*;
/*
<applet code="A.class" width=400 height=450></applet>
*/
public class A 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[]={150,250,250,150};
int d[]={10,10,60,60};
g.setColor(Color.blue);
g.drawPolyline(c,d,4);
}
}
Did you find apk for android? You can find new Free Android Games and apps.

LEAVE A REPLY