-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroidLoading.java
More file actions
78 lines (68 loc) · 927 Bytes
/
AndroidLoading.java
File metadata and controls
78 lines (68 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*<applet code="AndroidLoading" width="1000" height="1000">
</applet>*/
import java.awt.*;
import java.applet.*;
public class AndroidLoading extends Applet implements Runnable
{
Thread t;
int i,j=0,k=0,l,cx=0;
boolean b=false;
public void init()
{
t=new Thread(this);
}
public void start()
{
t.start();
}
public void paint(Graphics g)
{
g.drawArc(300,300,300,300,i+l,j);
g.drawArc(299,299,302,302,i+l,j);
}
public void run()
{
while(true)
{
for(i=0;i<=360;i++)
{
repaint();
try
{
t.sleep(5);
}
catch(Exception e)
{
}
if(b==false)
{
if(j>=200)
{
b=true;
cx=1;
}
if(cx>=3)
{
l++;
}
cx++;
j++;
}
else
{
if(j==0)
{
b=false;
cx=0;
}
j--;
if(cx>=3)
{
l++;
}
cx++;
}
}
}
}
}