|
@ -42,9 +42,7 @@ public class ChatClient extends JFrame implements KeyListener { |
|
|
} |
|
|
} |
|
|
private void receiveMessages() { |
|
|
private void receiveMessages() { |
|
|
try { |
|
|
try { |
|
|
// Um GUI zu testen |
|
|
|
|
|
// Kommentar in der Zeile 28 wird weggenohmen, wenn der Server erstellt wird. |
|
|
|
|
|
// connectionToServer = new Socket(address, port); |
|
|
|
|
|
|
|
|
connectionToServer = new Socket(address, port); |
|
|
initGui(); |
|
|
initGui(); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
JOptionPane.showMessageDialog(null, "Verbindung zum Server \"" + address + "\" fehlgeschlagen."); |
|
|
JOptionPane.showMessageDialog(null, "Verbindung zum Server \"" + address + "\" fehlgeschlagen."); |
|
|