Biblioteca Java - Blame information for rev 28

Subversion Repositories:
Rev:
Rev Author Line No. Line
28 mihai 1 /*
2  * PriorityTest.java
3  */
4 package exemple.fire.priority;
5  
6 import java.awt.Graphics;
7  
8 /**
9  * Class created by @author Mihai HULEA at Feb 22, 2005.
10  *
11  *
12  */
13 public class PriorityTest extends Thread{
14     Graphics g;
15     int i=0;
16     int pos;
17  
18     public PriorityTest(int pos, int p, Graphics g){
19         this.setPriority(p);
20         this.g = g;
21         this.pos = pos;
22     }
23  
24     public void run(){
25  
26         while(i<200){
27             i++;
28             display();
29             try {
30                 sleep(10);
31             } catch (InterruptedException e) {
32                 // TODO Auto-generated catch block
33                 e.printStackTrace();
34             }
35         }
36     }
37  
38     public void display(){
39         g.drawRect(i,pos,2,2);
40     }
41  
42  
43 }