Posted by : Unknown Thursday, 2 July 2015

import java.applet.Applet;
import java.awt.Graphics;
public class applet extends Applet
{
       public void paint(Graphics g) 
       {
            int x[] = { 55,64,21,212,498,34 };
            int y[] = { 45,14,64,10,120,50 };
            int p = x.length;
            g.fillPolygon(x,y,p);
       }
}

Output:

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Total Pageviews

- Copyright © Learning Java Program - Powered by Blogger -