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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
| package gestionbudget;
import com.sun.org.apache.bcel.internal.generic.NEW;
import java.awt.*;
import java.io.File;
import javax.swing.*;
import javax.swing.JFrame;
import javax.imageio.IIOException;
import javax.imageio.ImageIO;
/**
*
* @author UTILISATEUR
*/
public class menu extends JFrame{
JPanel contentPane;
JLabel jLabel1 = new JLabel();
private JMenuBar menubar ;
private JMenu fichier ;
private JMenu etat ;
private JMenu apropos;
private JMenu enregistrement;
private JMenuItem fermer;
private JMenuItem compte;
private JMenuItem regime;
private JMenuItem lignebudget;
private JMenuItem gestion;
private JMenuItem fournisseur;
private JMenuItem exercice;
private JMenuItem depense;
private JMenuItem centre;
private JMenuItem etatfournisseur;
private JMenuItem etatdepense;
private JMenuItem etatlignetotal;
private JMenuItem etatlignepartiel;
private javax.swing.JLabel labelo;
private JMenuItem Apropos;
public menu()
{
contentPane = (JPanel) this.getContentPane();
jLabel1.setFont(new java.awt.Font("Comic Sans MS", 1, 20));
// jLabel1.setText("Salut, ca va ?");
jLabel1.setBounds(new Rectangle(0, 0,434, 332));
jLabel1.setIcon(new ImageIcon("images/Logo.jpg"));
contentPane.setLayout(null);
this.setSize(new Dimension(434, 332));
menubar = new JMenuBar();
fichier = new JMenu("FICHIER");
enregistrement=new JMenu(new actiondepense(this,"ENREGISTREMENT"));
fermer= new JMenuItem(new ActionQuitter(this,"FERMER"));
etat = new JMenu("ETAT");
compte = new JMenuItem(new actioncompte(this,"ENREGISTRER UN COMPTE "));
regime = new JMenuItem(new actionregime(this,"ENREGISTRER UN REGIME"));
gestion = new JMenuItem(new actiongestion(this,"ENREGISTRER UNE GESTION"));
lignebudget = new JMenuItem(new actionligne(this,"ENREGISTRER UNE LIGNE"));
fournisseur = new JMenuItem(new actionfournisseur(this,"ENREGISTRER UN FOURNISSEUR"));
exercice = new JMenuItem(new actionexercice(this,"ENREGISTRER UN EXERCICE"));
depense = new JMenuItem(new actiondepense(this,"ENREGISTRER UNE DEPENSE"));
centre = new JMenuItem(new actioncentre(this,"ENREGISTRER UN CENTRE"));
etatfournisseur = new JMenuItem(new actionetatfournisseur(this,"ETAT FOURNISSEUR"));
etatdepense = new JMenuItem(new actionetatdepense(this,"ETAT DEPENSE"));
etatlignetotal = new JMenuItem(new actionlignetotal(this,"ETAT LIGNEBUDGETAIRE TOTALE"));
etatlignepartiel = new JMenuItem(new actionlignepartiel(this,"ETAT LIGNE BUDGETAITRE PARTIELLE"));
apropos=new JMenu("Apropos ");
Apropos=new JMenuItem(new ActionApropos(this,"Apropos de ce Logiciel"));
fichier.add(enregistrement);
this.fichier.addSeparator();
enregistrement.add(exercice);
this.enregistrement.addSeparator();
enregistrement.add(regime);
this.enregistrement.addSeparator();
enregistrement.add(gestion);
this.enregistrement.addSeparator();
enregistrement.add(centre);
this.enregistrement.addSeparator();
enregistrement.add(compte);
this.enregistrement.addSeparator();
enregistrement.add(lignebudget);
this.enregistrement.addSeparator();
enregistrement.add(fournisseur);
this.enregistrement.addSeparator();
enregistrement.add(depense);
fichier.add(fermer);
menubar.add(fichier);
etat.add(etatfournisseur);
this.etat.addSeparator();
etat.add(etatdepense);
this.etat.addSeparator();
etat.add(etatlignetotal);
this.etat.addSeparator();
etat.add(etatlignepartiel);
menubar.add(etat);
apropos.add(Apropos);
menubar.add(apropos);
setJMenuBar(menubar);
this.setSize(new Dimension(800, 600));
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLocationRelativeTo(null);
setTitle("LE BUDGET DE LA CARFO"); //Titre la fenêtre
contentPane.add(jLabel1, null);
}
} |
Partager