From 24c7f1d6ab1dc5eb003ab99470565e288235a9e1 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Fri, 9 Feb 2024 02:24:07 +0100 Subject: [PATCH] =?UTF-8?q?Schriftgr=C3=B6=C3=9Fenwahl=20implementiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ChatGUI.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/ChatGUI.java b/src/main/java/ChatGUI.java index a63cbcc..4340cd3 100644 --- a/src/main/java/ChatGUI.java +++ b/src/main/java/ChatGUI.java @@ -1,6 +1,7 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; +import java.awt.Font; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -64,6 +65,9 @@ public class ChatGUI implements ActionListener { blue.addActionListener(this); black.addActionListener(this); green.addActionListener(this); + small.addActionListener(this); + medium.addActionListener(this); + large.addActionListener(this); exit.addActionListener(this); @@ -112,5 +116,17 @@ public class ChatGUI implements ActionListener { } else if (e.getSource() == green) { outputTextArea.setForeground(Color.GREEN); } + if(e.getSource() == small) { + outputTextArea.setFont(outputTextArea.getFont().deriveFont(Font.PLAIN, 12)); + } + if(e.getSource() == medium) { + outputTextArea.setFont(outputTextArea.getFont().deriveFont(Font.PLAIN, 16)); + } + if(e.getSource() == large) { + outputTextArea.setFont(outputTextArea.getFont().deriveFont(Font.PLAIN, 20)); + } + + + } }