21 lines
		
	
	
		
			339 B
		
	
	
	
		
			Java
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			339 B
		
	
	
	
		
			Java
		
	
	
	
	
	
|   | 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++;
 | ||
|  | 		}
 | ||
|  | 	}
 | ||
|  | }
 |