|
@ -1,6 +1,7 @@ |
|
|
import java.awt.BorderLayout; |
|
|
import java.awt.BorderLayout; |
|
|
import java.awt.Color; |
|
|
import java.awt.Color; |
|
|
import java.awt.Dimension; |
|
|
import java.awt.Dimension; |
|
|
|
|
|
import java.awt.Font; |
|
|
import java.awt.Toolkit; |
|
|
import java.awt.Toolkit; |
|
|
import java.awt.event.ActionEvent; |
|
|
import java.awt.event.ActionEvent; |
|
|
import java.awt.event.ActionListener; |
|
|
import java.awt.event.ActionListener; |
|
@ -64,6 +65,9 @@ public class ChatGUI implements ActionListener { |
|
|
blue.addActionListener(this); |
|
|
blue.addActionListener(this); |
|
|
black.addActionListener(this); |
|
|
black.addActionListener(this); |
|
|
green.addActionListener(this); |
|
|
green.addActionListener(this); |
|
|
|
|
|
small.addActionListener(this); |
|
|
|
|
|
medium.addActionListener(this); |
|
|
|
|
|
large.addActionListener(this); |
|
|
|
|
|
|
|
|
exit.addActionListener(this); |
|
|
exit.addActionListener(this); |
|
|
|
|
|
|
|
@ -112,5 +116,17 @@ public class ChatGUI implements ActionListener { |
|
|
} else if (e.getSource() == green) { |
|
|
} else if (e.getSource() == green) { |
|
|
outputTextArea.setForeground(Color.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)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |