⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 squareanddiamonds.java

📁 PRl教学程序 PRl教学程序 PRl教学程序
💻 JAVA
字号:
/* Java Applet generated by CGLIB of B-Prolog */
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
import java.net.*;
import java.net.*;

public class squareAndDiamonds extends Applet {
boolean repeat = false;
public void start(){repeat = true; }
public void stop(){repeat = false; }
public void init(){
setLayout(null);
}
public void paint(Graphics g){
g.setColor(new Color(-16777216));
{
int[] xs= new int[]{0,0,450,450};
int[] ys= new int[]{0,450,450,0};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-65536));
{
int[] xs= new int[]{0,225,450,225};
int[] ys= new int[]{225,450,225,0};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-16777216));
{
int[] xs= new int[]{112,337,337,112};
int[] ys= new int[]{337,337,112,112};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-65536));
{
int[] xs= new int[]{224,337,224,112};
int[] ys= new int[]{337,224,112,224};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-16777216));
{
int[] xs= new int[]{280,280,168,168};
int[] ys= new int[]{280,168,168,280};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-65536));
{
int[] xs= new int[]{280,224,168,224};
int[] ys= new int[]{224,168,224,280};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-16777216));
{
int[] xs= new int[]{252,196,196,252};
int[] ys= new int[]{196,196,252,252};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-65536));
{
int[] xs= new int[]{224,196,224,252};
int[] ys= new int[]{196,224,252,224};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-16777216));
{
int[] xs= new int[]{210,210,238,238};
int[] ys= new int[]{210,238,238,210};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-65536));
{
int[] xs= new int[]{210,224,238,224};
int[] ys= new int[]{224,238,224,210};
g.drawPolygon(xs,ys,4);
}
g.setColor(new Color(-16777216));
{
int[] xs= new int[]{217,231,231,217};
int[] ys= new int[]{231,231,217,217};
g.drawPolygon(xs,ys,4);
}
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -