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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Elementbanque extends JPanel
{
public Elementbanque(Calcul c)
{
JLabel creditinsset = new JLabel("Crédit INSSET");
JLabel sommedemande = new JLabel("Somme demandé");
JTextField sommedemande = new JTextField(10);
sommedemande.addActionListener(new Fonct(1,c));
this.add(sommedemande);
JLabel taux = new JLabel("Taux");
JTextField quotient = new JTextField(10);
quotient.addActionListener(new Fonct(2,c));
this.add(quotient);
JLabel totaldue = new JLabel("Total due");
JTextField totaldue = new JTextField(10);
totaldue.addActionListener(new Fonct(3,c));
this.add(totaldue);
JLabel cal = new JLabel("calcul");
JButton somme = new JButton("somme");
somme.addActionListener(new Fonct(4,c));
this.add(somme);
JLabel nbmois = new JLabel("période du pret");
JComboBox temps= new JComboBox();
for(int i=1;i<60;i++)
temps.addItem("" + i);
temps.addActionListener(new Fonct(5,c));
this.add(temps);
String[][] rowData = new String[2][3];
String[] columnNames = new String[3];
columnNames[0]="Mois";
columnNames[1]="Année";
columnNames[2]="Somme_prélevée";
JTable rembourcement = new JTable(rowData,columnNames);
JScrollPane sroll = new JScrollPane(rembourcement);
rembourcemen.addActionListener(new Fonct(7,c));
JButton quit = new JButton("Quitter");
quit.addActionListener(new Fonct(6,c));
this.add(quit);
}
} |
Partager