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 69 70 71 72 73 74 75 76
|
package eF;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTable;
public class journal extends JDialog {
JTable table_h;
private JSplitPane split3;
public journal(JFrame parent, String title, boolean modal){
super(parent, title, modal);
this.setSize(700, 700);
this.setLocationRelativeTo(null);
this.setResizable(false);
this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
this.initComponent4();
this.setVisible(true);
}
private void initComponent4() {
JPanel filtre = new JPanel();
// filtre.setPreferredSize(new Dimension(50, 50));
//Ajouter les blocs de filtre ICI *******A FAIRE*******
// TABLEAU HISTORIQUE
Object[][] data_h = {{"", "", "",""},{"", "", "",""},{"", "", "",""},{"", "", "",""},{"", "", "",""},{"", "", "",""},{"", "", "",""},{"", "", "",""}};
String titre_h[] = {"Facture No","Client","Montant (kmf)","Date","Status"};
this.table_h = new JTable(data_h, titre_h);
JPanel th = new JPanel();
th.add(new JScrollPane(table_h));
JPanel content = new JPanel();
split3 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, filtre, th);
split3.setDividerLocation(100);
content.add(split3, BorderLayout.NORTH);
JPanel control = new JPanel();
JButton hBouton = new JButton("Terminer");
hBouton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
setVisible(false);
}
});
JButton sBouton = new JButton("Télécharger pdf");
JButton iBouton = new JButton("Imprimer");
control.add(sBouton);
control.add(iBouton);
control.add(hBouton);
this.getContentPane().add(content);
this.getContentPane().add(control, BorderLayout.SOUTH);
}
} |
Partager