Chat Server - client/server chat Java homework
<p>My chat room program. I have 2 packages, 1 for Client &amp; other for Server. Run Server program, fill the PortField and click button Start Server, window program is stuck, i cant do anything on it, but Server still work, Clients still connect and chat.</p>

<pre><code>private void btnOpenActionPerformed(java.awt.event.ActionEvent evt) {                                        

    int port = Integer.parseInt(txtPort.getText());
    go(port);
}                                       
private void go(int port){
    try {
        listUser = new Hashtable&lt;String, ClientConnect&gt;();
        server = new ServerSocket(port);
        txaStatus.append("Server is started\n");
        txaStatus.append("IP Server : "+InetAddress.getLocalHost().getHostAddress()+"\n");
        txaStatus.append("Port : " + port + "\n");
        while(true){
            client = server.accept();
            new ClientConnect(this,client);//class ClientConnect for DataOutPut &amp; DataInput Client &lt;=&gt; Server
        }
    } catch (IOException e) {
        txaStatus.append("Server cannot start\n");
                    JOptionPane.showMessageDialog(this,"Port busy","warning",JOptionPane.WARNING_MESSAGE);
                    System.exit(0);
    }
}
</code></pre>
