This application implements the main function of sending messages both in individual conversations and group chats after users successfully log in their accounts. The project is concurrent server-client interaction and utilizes many GUI interfaces.
- Import all the Java files and password.txt file. password.txt file should be outside the src folder.
- Run Server.java and input desired number under Server Port. Press Start Server to activate. "Waiting for Client to connect" should appear.
- Run Client.java and press Sign Up. Input desired Username and Password and you should see "User Created".
- Type "localhost" under Server IP, Server Port from Step 2) and the Username and Password just created. (password.txt should have been updated)
- User Interface for User should appear. Box under "Users" will show all online Users. Box under "Chat Rooms" will show all chatrooms the current user is in.
- Repeat Step 1) ~ 4) to connect another User.
- Press "New Chat" on one of the User's window. Type in Room name, choose the other Users to invite. (One at a time)
- The invited Users should see the newly created chatroom under their "Chat Rooms". Both the Users will have to click on the room name, press "Join" to enter and start conversation.
- Users can create another room and click that room to join to chat on that room.
- Users can click on the room name and press "Delete" to delete selected room from his window (Other Users in that room will still see that room).
- "Edit Appearance" on top right can be used to change background color of the chat rooms.
- When a User closes the window, Server should see "username: disconnected".
- Unless Sever shuts down, all chatrooms and messages should remain even when user disconnects. However, user MUST create a new chat in order to refresh and retain all the chatrooms from his PREVIOUS connection.
As its name, this class is client side. Users launch this class to log in their accounts or do operations of deleting and editing their accounts. After logging in, this class will open chat room window automatically, and users can do other operations.
Testing Please refer to ##How to run
This class is the GUI interface of deleting users' accounts.
This class is the GUI interface of editing users' accounts.
This class is the GUI interface of editing background color of chat room.
This class is the GUI interface of logging in.
This class is the GUI interface of the main page after users log in their accounts successfully.
This is the class of Room object. To create a new room, users need to enter the name of chat room. This class contains methods of adding or removing users from a chat room. Also, every room has an ArrayList to store messages.
As its name, this is the server side. Running this method, developers of this application can start the server so that users can connect. On the other hand, when developers stop the serever, users are unable to log in their accounts.
Testing Please refer to ##How to run
This class is the GUI interface of log in page.
This class is the GUI interface of signing up new accounts.
This is the class of User object. To create a new User object, users need to have the username. This class has the methods of adding the chat room for a user when they join a new one, and also remove the chat room when a user delete a chat room.