import java.awt.Graphics;
 import java.awt.*;
 import java.util.*;
 import javax.swing.*;
 import java.text.*;
import java.awt.event.*;



public class workerP1 extends JPanel implements Runnable 
{
JTextArea jb;
JPanel inputpanel;
int t;
Thread runner;
public workerP1()
{   inputpanel=new JPanel();
    t=0;
    String s=" t = "+t+" second";
	jb=new JTextArea(s);
	Color c=this.getBackground();
	jb.setBackground(c);
    inputpanel.add(jb);
    add(inputpanel);
    runner=new Thread(this);
    runner.start();
}   
     public void run()
     {
        while(true)
        {
	    try {Thread.sleep(1000);}
        catch(InterruptedException e)
        {System.err.println(e.toString());}

	    String s=" t = "+t%60+" second";
	    jb.setText(s);
	    t++;
        repaint();
        }
    }
}
