Select Git revision
ChatUpdate.java
Forked from
Ho Dac Hai / COMP90015-DSAss2-InfinityMonkeys-remaster
Source project has a limited visibility.
ChatUpdate.java 759 B
package client;
import remote.IChatUpdate;
import java.io.Serializable;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class ChatUpdate extends UnicastRemoteObject implements IChatUpdate, Serializable
{
private Client client;
public ChatUpdate(Client client) throws RemoteException
{
super();
this.client = client;
}
@Override
public boolean notifyChat(String fromClient, String message) throws RemoteException
{
// client.getChatScreen().setChatOutput(message);
client.getChatScreen().getChatOutputArea().setText(message);
//client.setReceivedMessage(message);
System.out.println(fromClient + ": " + message);
return true;
}
}