diff --git a/src/main/java/ChatGUI.java b/src/main/java/ChatGUI.java index 33a6cb7..124332e 100644 --- a/src/main/java/ChatGUI.java +++ b/src/main/java/ChatGUI.java @@ -38,6 +38,7 @@ public class ChatGUI implements ActionListener { menu.add(exit); menu.add(options); bar.add(menu); + exit.addActionListener(this); bar.add(menu); @@ -64,7 +65,9 @@ public class ChatGUI implements ActionListener { @Override public void actionPerformed(ActionEvent e) { - // TODO Auto-generated method stub + if (e.getSource() == exit) { + System.exit(0); + } }