/** * This method informs the ChatPanel and ServerSettings classes of the player's name, so it can be * displayed in the appropriate places. */ public void setName(String localName) { playerName = localName; chatPanel.setName(playerName); serverSettings.setName(playerName); }