title: Java RMI with JFrame - Get text from client to GUI
body: <p>Hey i just started with Java, RMI and JFrame about 2 weeks ago.
  I'm doing a game, it works fine as a console but now i'm adding a GUI and i'm getting confused about how to get the Remote Client messages to my Text Area</p>
  
  <p>Remote Client Interface</p>
  
  <pre><code>public interface IRemoteClientObject extends Remote {
      public void notifyLogin(String player) throws RemoteException;
      public void notifyLogout(String player) throws RemoteException;
      public void notifyStatus(String player, PlayerStatus status) throws RemoteException;
      public boolean challenge(String player) throws RemoteException;
  }
  </code></pre>
  
  <p>Remote Client</p>
  
  <pre><code>    public class RemoteClientObject extends UnicastRemoteObject implements
          IRemoteClientObject {
  
      /**
       * 
       */
      private static final long serialVersionUID = -7209335248515276286L;
  
      /**
       * @throws RemoteException
       */
      public RemoteClientObject() throws RemoteException {
  
      }
  
      @Override
      public void notifyLogin(String player) throws RemoteException {
          System.out.println("\n" + player + " joined the game"); 
      }
  
      @Override
      public void notifyLogout(String player) throws RemoteException {
          System.out.println("\n" + player + " left the game");   
      }
  
      @Override
      public void notifyStatus(String player, PlayerStatus status) throws RemoteException {
  
          if (status.equals(PlayerStatus.PLAYING)) 
          {
              System.out.println("\n" + player + " is now playing");
          }
          else if (status.equals(PlayerStatus.READY)) 
          {
              System.out.println("\n" + player + " is available to play");
          }
          else 
          {
              System.out.println("\n" + player + " is unavailable to play");
          }
      }
  
  }
  </code></pre>
  
  <p>In my program without any GUI, for example when a player login (it sends a message to all players with that notification)</p>
  
  <pre><code>for (Player player : serverObject.getPlayers()) 
                    {
                       player.getClient().notifyLogin(username);
                    }
  </code></pre>
  
  <p>But now i don't want that text in the System.out, i want it in a text area</p>
  
  <p><img src="https://i.stack.imgur.com/61BTv.png" alt="enter image description here"></p>
  
  <p>So can anyone make me a description about how to do this?Code is not the most important, i just want to understand how this works from a remote client to GUI (JTextArea)?</p>