From 981e7cbc0275174ee4f261613b79832863923d14 Mon Sep 17 00:00:00 2001
From: Hai HoDac <hhodac@student.unimelb.edu.au>
Date: Mon, 21 Oct 2019 13:58:10 +1100
Subject: [PATCH] Chat function worked! re-commit

---
 src/client/ClientUpdate.java | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 src/client/ClientUpdate.java

diff --git a/src/client/ClientUpdate.java b/src/client/ClientUpdate.java
new file mode 100644
index 0000000..7320c7b
--- /dev/null
+++ b/src/client/ClientUpdate.java
@@ -0,0 +1,26 @@
+package client;
+
+import remote.IClientUpdate;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+
+public class ClientUpdate extends UnicastRemoteObject implements IClientUpdate, Serializable {
+
+    private Client client;
+
+    public ClientUpdate(Client client) throws RemoteException
+    {
+        super();
+        this.client = client;
+    }
+
+    @Override
+    public boolean notifyClient(String fromClient, String newUsername) throws RemoteException
+    {
+        client.getChatScreen().getUserListArea().setText(newUsername);
+
+        return true;
+    }
+}
-- 
GitLab