public static void start(String username, String ip) throws Exception {
        String title = "Network Communicator : " + username;
        final String name = username;
        final int port = 6000;
        String IP = ip;

        final JFrame frame = new JFrame(title);
        JPanel contentPane = new JPanel(new BorderLayout());
        textArea = new JTextArea();


        lblPort = new JLabel("Port :");
        lblIntIP = new JLabel("Internal IP :");
        lblExtIP = new JLabel("External IP :");
        textArea.setEditable(false);
        textArea.setLineWrap(true);
        textArea.setTabSize(2);
        scrollPane = new JScrollPane(textArea);
        contentPane.add(scrollPane, BorderLayout.CENTER);
        frame.setContentPane(contentPane);
        
        JPanel panel = new JPanel();
        contentPane.add(panel, BorderLayout.NORTH);
        panel.setLayout(new GridLayout(0, 1, 0, 0));
        
        lblPort.setVerticalAlignment(SwingConstants.TOP);
        lblPort.setHorizontalAlignment(SwingConstants.LEFT);
        panel.add(lblPort);
        panel.add(lblIntIP);
        
        panel.add(lblExtIP);
        
        JPanel panel_1 = new JPanel();
        contentPane.add(panel_1, BorderLayout.SOUTH);
        panel_1.setLayout(new GridLayout(2, 0, 0, 0));
        final JTextField textField = new JTextField();
        panel_1.add(textField);
        
        JButton btnSend = new JButton("Send");
        btnSend.addActionListener(new ActionListener() {
        	public void actionPerformed(ActionEvent arg0) {
                if (connected) {
                    sendMessage(textField.getText());
                    textField.setText("");
                }
        		
        	}
        });
        panel_1.add(btnSend);
        textField.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (connected) {
                    sendMessage(textField.getText());
                    textField.setText("");
                }
            }
        });
        textField.requestFocusInWindow();
        frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                MainWindow.closeconv();
                if (s != null) {
                    try {
                        s.close();
                        
                    } catch (IOException ex) {
                    }
                }
                frame.dispose();
            }
        });
        frame.setSize(400, 400);
        frame.setVisible(true);
        showIPs();

        if (IP.equals("")) {
            (new Thread() {
                @Override
                public void run() {
                    Server.start(Integer.toString(port));
                }
            }).start();
            Thread.sleep(1000);
            
            InetAddress thisIp = null;
			NetworkInterface ni = NetworkInterface.getByName("wlan0");    
	    	Enumeration<InetAddress> inetAddresses =  ni.getInetAddresses();
	    	while(inetAddresses.hasMoreElements()) {  
	    	         InetAddress ia = inetAddresses.nextElement();  
	    	         if(!ia.isLinkLocalAddress()) {  
	    	             thisIp=ia;
	    	         }    
	    	} 
	    	
            s = new Socket(thisIp.getHostAddress(), port);

            lblPort.setText("Port : " + port);
        } 
        else 
        {
            s = new Socket(IP, port);
        }
        connected = true;

        out = new ObjectOutputStream(s.getOutputStream());
        out.flush();
        sendMessage(name);
        in = new ObjectInputStream(s.getInputStream());

        while (MainWindow.workerconv) {
            try {
                logToScreen(in.readObject().toString());
                Toolkit.getDefaultToolkit().beep();
            } catch (Exception ex) {
            }
        }

    }