A simple real-time chat application built in Java using Swing for the graphical user interface. This project simulates a basic messaging platform where users can send and receive text messages in a chat window, making it ideal for learning socket programming and building desktop-based applications.
- Real-time Messaging: Instant message sending and receiving between the server and client.
- Graphical User Interface (GUI): Created using Java Swing to provide a chat interface with a look and feel similar to modern messaging apps.
- Customizable Components: Includes header icons for profile, video call, and options.
- Networking: Uses
ServerSocket
andSocket
classes to establish server-client communication. - Message Formatting: Messages are displayed with timestamps for better readability.
- Exit Button Functionality: Allows the application to be closed via a back button.
Run the Server
class to start the chat server. The server will listen for incoming client connections on port 6001
.
To establish a connection, run a corresponding client application (to be implemented or provided separately). Once the client connects, messages can be sent between the server and client.
- Sending Messages: Type a message in the text field and click the "Send" button to transmit the message.
- Exiting the Chat: Click the back button (top-left) to close the chat application.