Java GUI programming to realize online chat room
introduction
Integrated application of Java GUI programming and network programming to achieve a chat room software that can support multiple groups of users to use at the same time. The chat room has a friendly GUI interface and uses C / S mode to support multiple users to use at the same time. Users can choose to join or create a room and send messages (text and pictures) to other users in the room
major function
The functions of the client mainly include the following functions:
The functions of the server mainly include:
framework
The whole program adopts C / s design architecture, which is divided into a server and multiple clients. The server opens a port to all open clients. The client connects to the port and sends and receives information. The server maintains the client group internally and uses a sub thread to send and receive information for each client
Design of basic classes
User class
Room class
Roomlist class
Server
Server
ServerThread
client
Client
ClientThread
Icondialog (select expression interface)
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.