|
|
@ -1,4 +1,5 @@ |
|
|
|
import javax.swing.*; |
|
|
|
import java.awt.*; |
|
|
|
import java.io.IOException; |
|
|
|
import java.net.Socket; |
|
|
|
|
|
|
@ -23,10 +24,13 @@ public class ChatClient extends JFrame { |
|
|
|
|
|
|
|
private void initGui() { |
|
|
|
outputTextArea = new JTextArea(); |
|
|
|
outputTextArea.setBorder(BorderFactory.createTitledBorder("Chat")); |
|
|
|
|
|
|
|
inputTextField = new JTextField(); |
|
|
|
inputTextField.setBorder(BorderFactory.createTitledBorder("Nachricht eingeben")); |
|
|
|
|
|
|
|
add(outputTextArea); |
|
|
|
add(inputTextField); |
|
|
|
add(outputTextArea, BorderLayout.CENTER); |
|
|
|
add(inputTextField, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
setVisible(true); |
|
|
|
setSize(800, 600); |
|
|
|