- Thread t=new Thread(new Runnable(){ 
-     public void run(){ 
-          long i = 0; 
-          while(true){ 
-               i++; 
-               Label1.setText("1er label mostrado en la ocacion " + i); 
-               try { 
-                  Thread .sleep(5000); 
-                } catch (InterruptedException ex) { 
-                  ex.printStackTrace(); 
-                } 
-                Label2.setText("2do label mostrado en la ocacion" + i); 
-          }     
-     } 
- ); 
- t.start(); 
-   
-