Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danuja01/java-socket-messenger


https://github.com/danuja01/java-socket-messenger

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Java Chat Application

>This is a simple chat application that allows users to send broadcast messages as well as private messages to specific clients. It also automatically adds new users to the user list when they log in to the chat application, and their names will be visible in the list.

> I used the Java Swing library to create a simple user interface for the application, and Java sockets to implement the chat functionality. This was a small assessment given as part of my studies at SLIIT to learn about sockets.

## Features

- Broadcast messages to all users
- Send private messages to specific users
- Automatically add new users to the user list
- User list displays the names of all connected users

## Technologies Used
- Java
- Java Swing Library
- Java Sockets

## Installation

To run this application, follow these steps:

**1. Clone the repository to your local machine**
> Copy code
``git clone https://github.com/your-username/java-chat-application.git``

**2. Open the project in your Java IDE**

**3. Run the ChatServer.java file to start the server**

**4. Run the ChatClient.java file to start the client**

## Usage
1. Give IP adress as ``localhost``
2. Enter your desired username and click "Connect"
3. see the chat box at the bottom of the screen to send messages
4. Use the user list on the right-hand side of the screen to select users for private messages
5. Check the boardcast checkbox for boardcast messages

## Credits
>This project was created as part of an assessment for my studies at SLIIT. The code was written by me, and I used the Java Swing library and Java sockets to implement the chat functionality.