23 lines
613 B
Java
23 lines
613 B
Java
import javax.swing.*;
|
|
import java.awt.*;
|
|
import java.awt.event.*;
|
|
import java.util.Deque;
|
|
|
|
public class EvenementIngredient implements ItemListener{
|
|
|
|
private Deque<JCheckBox> historiqueChoix;
|
|
private JButton boutonRetour;
|
|
|
|
public EvenementIngredient(Deque<JCheckBox> historiqueChoix, JButton boutonRetour){
|
|
this.historiqueChoix = historiqueChoix;
|
|
this.boutonRetour = boutonRetour;
|
|
}
|
|
|
|
@Override
|
|
public void itemStateChanged(ItemEvent e){
|
|
JCheckBox coche = (JCheckBox) e.getSource();
|
|
this.historiqueChoix.push(coche);
|
|
this.boutonRetour.setEnabled(true);
|
|
}
|
|
}
|