ActionListener für richtigen Button
This commit is contained in:
parent
ca70adbf32
commit
1099015cfc
@ -39,13 +39,14 @@ public class GameGui {
|
||||
frame.add(board,BorderLayout.CENTER);
|
||||
frame.requestFocusInWindow();
|
||||
|
||||
// ActionListener al = ev -> {if(ev.getSource() == buttonVerlassen)
|
||||
// {
|
||||
// System.exit(0);
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// buttonStop.addActionListener(al);
|
||||
// Wenn man Button "Verlassen" drückt,schlißt das Spielfenster.
|
||||
ActionListener al = ev -> {if(ev.getSource() == buttonVerlassen)
|
||||
{
|
||||
System.exit(0);
|
||||
}
|
||||
};
|
||||
|
||||
buttonVerlassen.addActionListener(al);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user