Projet sur la gestion de ventes avec JAVA
Projet sur la gestion de ventes avec JAVA
Cet article propose en détaille un projet sur la gestion de ventes avec JAVA il permet la saisie d’une commande, la gestion des cilent et des produits.
Vous pourrez télécharger le fichier au format zip il contient le code sources complet.
Ce programme utilise un fichier pour lire et pour ecrire, vous avez aussi la possibilité de gestion de son et d'image.
Les classes :
- Accueil
- Admin
- Affiche client
- Affiche produit
- Arete
- Catalogue
- Client
- Commande
- Format
- Graphe
- Lire et Ecrire
- Log
- Mon filtre
- Parcours
- Produit
- Saisie Produit
- Son
Extrait du code source :
package devlog;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* <p>Titre : </p>
* <p>Description : </p>
* <p>Copyright : Copyright (c) 2005</p>
* <p>Société : </p>
* @author non attribuable
* @version 1.0
*/
public class Commande extends JFrame {
JPanel jPanel1 = new JPanel();
JPanel jPanel2 = new JPanel();
JPanel jPanel3 = new JPanel();
JPanel jPanel4 = new JPanel();
GridLayout gridLayout1 = new GridLayout();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JLabel jLabel7 = new JLabel();
JLabel jLabel8 = new JLabel();
JLabel jLabel9 = new JLabel();
GridLayout gridLayout2 = new GridLayout(10,1);
JComboBox refProd = new JComboBox();
JTextField NomProd = new JTextField();
JTextField Quant = new JTextField();
JTextField NonClient = new JTextField();
Object[] civ = {"Mme", "Mlle", "Mr"};
JComboBox Civil = new JComboBox(civ);
JTextField adressLivr = new JTextField();
JTextField Tel = new JTextField();
JTextField montCommande = new JTextField();
Object[] pai= {"Chèque bancaire", "Espèce","Carte bleu", "Chèques"};
JComboBox moyPaiement = new JComboBox(pai);
GridLayout gridLayout3 = new GridLayout(10,1);
JButton Valider = new JButton();
JButton Annuler = new JButton();
GridLayout gridLayout4 = new GridLayout();
JLabel jLabel10 = new JLabel();
JComboBox RefClient = new JComboBox();
JPanel jPanel5 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
JButton NouvClient = new JButton();
JButton Quitter = new JButton();
/*************************
private int reference;
private double montant;
private Client client;
private Vector listeExemplaire;
*/
//********************
public Commande() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
/*
listeExemplaire=new Vector();
reference=r;
montant=m;
client=c;
*/
jPanel2.setLayout(gridLayout1);
jLabel1.setText(" REFERENCE DU PRODUIT");
jLabel2.setText(" NOM DU PRODUIT");
jLabel3.setText(" QUANTITE");
jLabel4.setText(" NOM DU CLIENT");
jLabel5.setOpaque(false);
jLabel5.setText(" CIVILITE");
jLabel6.setRequestFocusEnabled(true);
jLabel6.setText(" ADRESSE DE LIVRAISON");
jLabel7.setText(" TELEPHONE");
jLabel8.setText(" MONTANT DE LA COMMANDE");
jLabel9.setText(" MOYEN DE PAIEMENT");
jLabel10.setText(" REFERENCE CLIENT");
jPanel3.setLayout(gridLayout2);
jPanel4.setLayout(gridLayout3);
Valider.setSelectedIcon(null);
Valider.setText("VALIDER");
Valider.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Annuler_actionPerformed(e);
}
});
Annuler.setText("ANNULER");
Annuler.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Annuler_actionPerformed(e);
}
});
jPanel1.setLayout(gridLayout4);
NomProd.setText("");
Quant.setText("");
NonClient.setText("");
adressLivr.setText("");
Tel.setText("");
montCommande.setText("");
this.setResizable(false);
this.setSize(new Dimension(555, 315));
jPanel1.setPreferredSize(new Dimension(680, 25));
jPanel5.setLayout(borderLayout1);
NouvClient.setText("NOUVEAU");
Quitter.setText("QUITTER");
this.getContentPane().add(jPanel1, BorderLayout.SOUTH);
this.getContentPane().add(jPanel2, BorderLayout.CENTER);
jPanel2.add(jPanel3, null);
jPanel3.add(jLabel1, null);
jPanel3.add(jLabel2, null);
jPanel3.add(jLabel3, null);
jPanel3.add(jLabel4, null);
jPanel3.add(jLabel5, null);
jPanel3.add(jLabel6, null);
jPanel3.add(jLabel7, null);
jPanel3.add(jLabel8, null);
jPanel3.add(jLabel9, null);
jPanel3.add(jLabel10, null);
jPanel2.add(jPanel4, null);
jPanel4.add(refProd, null);
jPanel4.add(NomProd, null);
jPanel4.add(Quant, null);
jPanel4.add(NonClient, null);
jPanel4.add(Civil, null);
jPanel4.add(adressLivr, null);
jPanel4.add(Tel, null);
jPanel4.add(montCommande, null);
jPanel4.add(moyPaiement, null);
jPanel4.add(jPanel5, null);
jPanel5.add(RefClient, BorderLayout.CENTER);
jPanel5.add(NouvClient, BorderLayout.EAST);
jPanel1.add(Valider, null);
jPanel1.add(Annuler, null);
jPanel1.add(Quitter, null);
}
public void Annuler_actionPerformed(ActionEvent e){
this.dispose();
//Accueil ac = new Accueil();
//ac.show();
}
/*
public void setreference(int r){
reference=r;
}
public int getReference(){
return reference;
}
public void setMontant(double m){
montant=m;
}
public double getMontant(){
return montant;
}
public void setClient(Client c){
client=c;
}
public void setLiteExemplaire(Exemplaire e){
listeExemplaire.add(e);
}
public Vector getListeExemplaire(){
return listeEmplaire;
}
*/
}