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)); + } + + + } }