Browse Source

Logik verbessert

remotes/origin/server
Paul Kattenborn 11 months ago
parent
commit
c17abd8dbc
  1. 4
      src/main/java/ChatGUI.java

4
src/main/java/ChatGUI.java

@ -136,8 +136,10 @@ public class ChatGUI implements ActionListener {
if (e.getSource() == inputTextField || e.getSource() == sendButton) {
String inputText = inputTextField.getText();
inputTextField.setText("");
if (!inputText.isEmpty()) {
addMessage(inputText);
}
}
if (e.getSource() == red) {
outputTextArea.setForeground(Color.RED);
@ -161,8 +163,10 @@ public class ChatGUI implements ActionListener {
String message = inputTextField.getText();
inputTextField.setText("");
addMessage(message);
if(!message.isEmpty()) {
sendPopupMessage(message);
}
}
}

Loading…
Cancel
Save