Guest User

DrawPolygonExample.java

a guest
Feb 12th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. import java.applet.*;
  2. import java.awt.*;
  3.  
  4. public class DrawPolygonExample extends Applet
  5. {
  6.     public void paint (Graphics g)
  7.     {
  8.         int[] x = new int[]{20,70,120,90,50};
  9.         int[] y = new int[]{70,20,70,120,120};
  10.         int n = 5;
  11.         g.drawPolygon(x, y, n);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment