1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JList;
import javax.swing.JTextArea;
public void ajouter_actionPerformed(ActionEvent event) {
Object s = new Object();
s = l1.getSelectedValue();
v.addElement(s);
}
public class listener1 {
private JList l1;
private JList l2;
public listener1(JList maListe, JList monText) {
l1 = maListe;
l2 = monText;
}
class MaFenetre_search_actionAdapter implements java.awt.event.ActionListener {
MaFenetre adaptee;
MaFenetre_search_actionAdapter(MaFenetre adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent event) {
adaptee.ajouter_actionPerformed(event);
}
} |