The code for the Client SwingChatClient. In the main method of both the Client and Server insert the following line between the f.
PrintWriter out. Send by just pressing the return key.
Delete the message in the txArea after it has been sent. Would you like to know more?
In the main method of both the Client and Server change the line. The code for the Server SwingChatServer. Get rid of the empty line at the start of the rxArea.
Ensure that it is clear who the message belongs to. Include the sent messages in the rxArea. String inputLine.
It's all free and requires no registration, but there are things you might want to know in order to own your own chat room and operate it effectively. Create rooms about any interest you would like, or make a room that is meant to be more like a private live sex chat porn for your friends.
Try the code on your machine.