Skip to content
Snippets Groups Projects
Select Git revision
  • 9e8a15634f2ada06bae99978079bcdec4603dc88
  • master default protected
  • find_previous_work
3 results

1_intro.html

Blame
  • 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;
        }
    
    }