📄 animatecircles.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 animateCircles 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){
while (repeat) {
{
g.setColor(this.getBackground());
Rectangle r = getBounds();
g.fillRect(r.x,r.y,r.width,r.height);
}
g.setColor(new Color(-65536));
g.fillOval(0,0,450,450);
try {
Thread.sleep(1000);
} catch (InterruptedException e){};
{
g.setColor(this.getBackground());
Rectangle r = getBounds();
g.fillRect(r.x,r.y,r.width,r.height);
}
g.setColor(new Color(-16777216));
g.fillOval(0,0,450,450);
try {
Thread.sleep(1000);
} catch (InterruptedException e){};
{
g.setColor(this.getBackground());
Rectangle r = getBounds();
g.fillRect(r.x,r.y,r.width,r.height);
}
g.setColor(new Color(-16711936));
g.fillOval(0,0,450,450);
try {
Thread.sleep(1000);
} catch (InterruptedException e){};
{
g.setColor(this.getBackground());
Rectangle r = getBounds();
g.fillRect(r.x,r.y,r.width,r.height);
}
g.setColor(new Color(-16776961));
g.fillOval(0,0,450,450);
try {
Thread.sleep(1000);
} catch (InterruptedException e){};
{
g.setColor(this.getBackground());
Rectangle r = getBounds();
g.fillRect(r.x,r.y,r.width,r.height);
}
g.setColor(new Color(-8355712));
g.fillOval(0,0,450,450);
try {
Thread.sleep(1000);
} catch (InterruptedException e){};
{
g.setColor(this.getBackground());
Rectangle r = getBounds();
g.fillRect(r.x,r.y,r.width,r.height);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -