this.pbValidate.addActionListener(this); this.pbCancel.addActionListener(this);
this.pbValidate.addActionListener(new ListenerBoutons()); this.pbCancel.addActionListener(new ListenerBoutons());
	public TimeEditDialog(JFrame dParent, Activity activity)	{		super(dParent,                LanguagesManager.getInstance().getString("TimeEditDialogTitle")+                activity.getName(),                 true);				// initialisation de notre attribut activity		this.activity = activity;				// creation de nos 2 boutons		this.pbValidate = new JButton(				LanguagesManager.getInstance().getString("OKButtonLabel"));		this.pbCancel = new JButton(				LanguagesManager.getInstance().getString("CancelButtonLabel"));				// Rcuperation de l'it courante 		int iCurrentIt = ApplicationManager.getInstance().getCurrentProject().getItCurrent();						// creation de nos 2 JTextField		// initialiss avec les valeurs de la HMap de Activity		this.tfEstimatedTime = new JTextField(				""+this.activity.gethmTime(iCurrentIt).getTimeRemaining());		this.tfPassedTime = new JTextField(				""+this.activity.gethmTime(iCurrentIt).getTimeElapsed());				// creation de nos 2 JLabel		this.lEstimatedTime = new JLabel(				LanguagesManager.getInstance().getString("EstimatedTimeLabel")+" :");		this.lPassedTime = new JLabel(				LanguagesManager.getInstance().getString("PassedTimeLabel")+" :");						// panel contenant les boutons		this.pButton = new JPanel();		this.pButton.add(this.pbValidate);		this.pButton.add(this.pbCancel);		// association des listeners aux boutons		this.pbValidate.addActionListener(this);		this.pbCancel.addActionListener(this);				// cration du panel contenant les JLabel		this.pWest = new JPanel();		this.pWest.setLayout(new BorderLayout());		this.pWest.add(this.lEstimatedTime,BorderLayout.NORTH);		this.pWest.add(this.lPassedTime,BorderLayout.SOUTH);				//creation du panel contenant les JTextField		this.pEast = new JPanel();		this.pEast.setLayout(new BorderLayout());		this.pEast.add(this.tfEstimatedTime,BorderLayout.NORTH);		this.pEast.add(this.tfPassedTime,BorderLayout.SOUTH);				// positionnement des panel dans la JDialog		this.setLayout(new BorderLayout());		this.getContentPane().add(this.pButton, BorderLayout.SOUTH);		this.getContentPane().add(this.pWest,BorderLayout.WEST);		this.getContentPane().add(this.pEast,BorderLayout.EAST);		        this.addWindowListener(        new WindowAdapter()        {            // on redefinit la methode windowsClosing heritee de WindowAdapter            void windowsClosing(WindowEvent e)            {                //on ferme la fenetre une inner class peut acceder aux                // attributs de la classe qui la contient en donnant sont nom                // suivit de .this puis le nom de l'attribut ou de la methode                TimeEditDialog.this.dispose();            }        });				this.pack();		// bo?te de dialogue centree par rapport a l'appelant		this.setLocationRelativeTo(dParent);		this.setVisible(true);	}