Browse Source

Change position of input and output areas

remotes/origin/feature/client/exchange-messages-between-client-server
Alena Bandarovich 11 months ago
parent
commit
6d32cd126c
  1. 8
      src/main/java/ChatClient.java

8
src/main/java/ChatClient.java

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

Loading…
Cancel
Save