TP
This commit is contained in:
21
DEV2.1/controle_machine_1/Acharnement.java
Normal file
21
DEV2.1/controle_machine_1/Acharnement.java
Normal file
@@ -0,0 +1,21 @@
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
public class Acharnement extends WindowAdapter{
|
||||
|
||||
private int compteur;
|
||||
|
||||
public Acharnement() {
|
||||
this.compteur = 0;
|
||||
}
|
||||
@Override
|
||||
public void windowClosing(WindowEvent evenement) {
|
||||
if (this.compteur == 2) {
|
||||
System.exit(0);
|
||||
}
|
||||
else {
|
||||
this.compteur++;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user