29 lines
733 B
Java
29 lines
733 B
Java
// package fr.iutfbleau.papillon;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import javax.swing.*;
|
|
import java.awt.*;
|
|
import java.awt.event.*;
|
|
|
|
public class Crud extends ArrayList<JButton> implements ActionListener{
|
|
|
|
private JButton btnAdd = new JButton("Ajouter");
|
|
private JButton btnDel = new JButton("Supprimer");
|
|
|
|
public Crud(){
|
|
btnAdd.addActionListener(this);
|
|
btnDel.addActionListener(this);
|
|
add(btnAdd);
|
|
add(btnDel);
|
|
}
|
|
|
|
public void actionPerformed(ActionEvent e){
|
|
if(e.getSource()==btnAdd){
|
|
System.out.println("test ajouter");
|
|
}
|
|
if(e.getSource()==btnDel){
|
|
System.out.println("test supprimer");
|
|
}
|
|
}
|
|
} |