diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index afa6503..cd73618 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -20,7 +20,7 @@ public class ChatClient extends JFrame implements KeyListener { super("Chat"); address = JOptionPane.showInputDialog("bitte IP-Adresse"); - if (address != null) { + if (null != address) { receiveMessages(); } } @@ -47,8 +47,8 @@ public class ChatClient extends JFrame implements KeyListener { private void receiveMessages() { try { connectionToServer = new Socket(address, Constants.PORT); - fromServerReader = new BufferedReader(new InputStreamReader(connectionToServer.getInputStream())); - toServerWriter = new PrintWriter(new OutputStreamWriter(connectionToServer.getOutputStream())); + fromServerReader = new BufferedReader(new InputStreamReader(connectionToServer.getInputStream())); + toServerWriter = new PrintWriter(new OutputStreamWriter(connectionToServer.getOutputStream())); initGui();