|
|
@ -47,7 +47,17 @@ public class ChatClient extends JFrame implements KeyListener { |
|
|
|
try { |
|
|
|
connectionToServer = new Socket(address, port); |
|
|
|
initGui(); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
// while (true) { |
|
|
|
// String message = fromServerReader.readLine(); |
|
|
|
// outputTextArea.append(message + "\n"); |
|
|
|
// } |
|
|
|
// Solang fromServerReader nicht erstellt ist als Kommentar |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
catch (Exception e) { |
|
|
|
JOptionPane.showMessageDialog(null, "Verbindung zum Server \"" + address + "\" fehlgeschlagen."); |
|
|
|
} |
|
|
|
} |
|
|
|