|
|
@ -15,6 +15,10 @@ import javax.swing.JTextField; |
|
|
|
public class ChatGUI implements ActionListener { |
|
|
|
|
|
|
|
JMenuItem exit = new JMenuItem("Exit"); |
|
|
|
JMenuItem black = new JMenuItem("black"); |
|
|
|
JMenuItem red = new JMenuItem("red"); |
|
|
|
JMenuItem blue = new JMenuItem("blue"); |
|
|
|
JMenuItem green = new JMenuItem("green"); |
|
|
|
JTextField inputTextField = new JTextField(); |
|
|
|
JTextArea outputTextArea = new JTextArea(); |
|
|
|
|
|
|
@ -33,11 +37,19 @@ public class ChatGUI implements ActionListener { |
|
|
|
gui.setJMenuBar(bar); |
|
|
|
|
|
|
|
JMenu options = new JMenu("options"); |
|
|
|
JMenu colors = new JMenu("font-colors"); |
|
|
|
|
|
|
|
JMenu menu = new JMenu("File"); |
|
|
|
menu.add(exit); |
|
|
|
menu.add(options); |
|
|
|
bar.add(menu); |
|
|
|
options.add(colors); |
|
|
|
|
|
|
|
colors.add(black); |
|
|
|
colors.add(red); |
|
|
|
colors.add(blue); |
|
|
|
colors.add(green); |
|
|
|
|
|
|
|
exit.addActionListener(this); |
|
|
|
|
|
|
|
bar.add(menu); |
|
|
|