Browse Source

refactoring: Kommentare + formatieren

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

10
src/main/java/ChatGUI.java

@ -87,6 +87,7 @@ public class ChatGUI implements ActionListener {
JScrollPane outputScrollPane = new JScrollPane(outputTextArea);
gui.add(outputScrollPane, BorderLayout.CENTER);
// Set up the input panel with text field and send button
JPanel inputPanel = new JPanel(new BorderLayout());
inputPanel.add(inputTextField, BorderLayout.CENTER);
inputPanel.add(sendButton, BorderLayout.EAST);
@ -102,6 +103,7 @@ public class ChatGUI implements ActionListener {
gui.setSize(quarterWidth, quarterHeight);
gui.setVisible(true);
}
// main methode zum Testen, müsste bei Implementation entfernt werden
public static void main(String[] args) {
@ -128,17 +130,15 @@ public class ChatGUI implements ActionListener {
} else if (e.getSource() == green) {
outputTextArea.setForeground(Color.GREEN);
}
if(e.getSource() == small) {
if (e.getSource() == small) {
outputTextArea.setFont(outputTextArea.getFont().deriveFont(Font.PLAIN, 12));
}
if(e.getSource() == medium) {
if (e.getSource() == medium) {
outputTextArea.setFont(outputTextArea.getFont().deriveFont(Font.PLAIN, 16));
}
if(e.getSource() == large) {
if (e.getSource() == large) {
outputTextArea.setFont(outputTextArea.getFont().deriveFont(Font.PLAIN, 20));
}
}
}
Loading…
Cancel
Save