import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class ClientClass extends Thread
{
	int counter;
	private int ID = 0;

public ClientClass( int myID )
   {
	ID = myID;
   }

public void run()
    {	
    System.out.println("Starting Client " + ID);
	eventClass handler = new eventClass();
	Timer clientTimer = new Timer(500, handler);
	clientTimer.start();
	
	}  // end run()

private class eventClass implements ActionListener
   {
   public void actionPerformed ( ActionEvent e )	
	  {
	   counter++;
	   System.out.println(ID+ ": " + counter);
	   if (counter == 10)
		  {
		  commClass.ClientToServer[ ID ] = "exit";
		  } 
	  } // end actionPerformed
   } // end private class	


} // end class
