2022-05-21 22:17:25 +02:00
|
|
|
import java.awt.event.*;
|
|
|
|
public class MenuListener implements ActionListener{
|
|
|
|
private FrameJeu fenetre;
|
2022-05-23 19:32:09 +02:00
|
|
|
private FrameMenu menu;
|
|
|
|
public MenuListener(FrameJeu fenetre, FrameMenu menu){
|
2022-05-21 22:17:25 +02:00
|
|
|
this.fenetre=fenetre;
|
2022-05-23 19:32:09 +02:00
|
|
|
this.menu=menu;
|
2022-05-21 22:17:25 +02:00
|
|
|
}
|
2022-05-24 22:32:34 +02:00
|
|
|
|
|
|
|
@Override
|
2022-05-21 22:17:25 +02:00
|
|
|
public void actionPerformed(ActionEvent event){
|
2022-05-23 19:32:09 +02:00
|
|
|
this.menu.setVisible(true);
|
2022-05-24 23:41:34 +02:00
|
|
|
WindowListener[] wl= this.fenetre.getWindowListeners();
|
|
|
|
this.fenetre.removeWindowListener(wl[0]);
|
2022-05-21 22:17:25 +02:00
|
|
|
this.fenetre.dispose();
|
|
|
|
}
|
|
|
|
}
|