public SimpleClient(String serverName,int port){
       super("Client");
       rng = new Random();
       this.setSize(500, 500);
       this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       this.setVisible(true);
       button = new JButton("Change");
       button.addActionListener(this);
       add(button);
       try{  
           System.out.println("working");
           socket = new Socket(serverName,port);
           System.out.println("working");
           writer= new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
           reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
           start();
       }
       catch(Exception e){
           e.printStackTrace();
       }
   }