相关代码 |
|
import java.applet.*; import java.awt.*; public class E5_23 extends Applet { int px1[]={40,80,0,40}; int py1[]={5,45,45,5}; int px2[]={140,180,180,140,100,100,140}; int py2[]={5,25,45,65,45,25,5}; public void paint(Graphics g) { g.drawPolygon(px1,py1,4); g.drawPolygon(px2,py2,7); } }
相关资源 |
|