This is a simple chat application built using Java and Swing. It includes both server and client components to facilitate communication between multiple clients.
- Multiple clients can connect to the server and send messages to each other in real-time.
- The chat interface displays the client's own messages on the right and other clients' messages on the left.
- Messages are color-coded for easy distinction between different clients.
- Run the
chatserver
class to start the server. - The server listens on port 2000 for incoming client connections.
- Run the
client
class to start the client interface. - Enter your name when prompted to join the chat.
- Type messages in the text field at the bottom of the interface and press Enter to send.
chatserver
: Manages client connections and message broadcasting.ClientHandler
: Handles communication for each connected client.clientchat
: Manages the client's connection to the server and message sending/receiving.client
: Provides the graphical user interface for the chat application.
- Java
- Swing for GUI
- Sockets for network communication
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License.