Browse Source

action für exitbutton hinzugefügt

remotes/origin/server
Paul Kattenborn 11 months ago
parent
commit
c5487e0bd1
  1. 5
      src/main/java/ChatGUI.java

5
src/main/java/ChatGUI.java

@ -38,6 +38,7 @@ public class ChatGUI implements ActionListener {
menu.add(exit); menu.add(exit);
menu.add(options); menu.add(options);
bar.add(menu); bar.add(menu);
exit.addActionListener(this);
bar.add(menu); bar.add(menu);
@ -64,7 +65,9 @@ public class ChatGUI implements ActionListener {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if (e.getSource() == exit) {
System.exit(0);
}
} }

Loading…
Cancel
Save