/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package base_de_donnee; /** * * @author USER */ public class Principale extends javax.swing.JFrame { /** * Creates new form Principale */ public Principale() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { PRINCIPALjLabel = new javax.swing.JLabel(); CachjBT = new javax.swing.JButton(); UtilBt = new javax.swing.JButton(); RetjBT = new javax.swing.JButton(); ProdjBT = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); PRINCIPALjLabel.setFont(new java.awt.Font("Times New Roman", 3, 24)); // NOI18N PRINCIPALjLabel.setText("Principale"); CachjBT.setFont(new java.awt.Font("Times New Roman", 3, 24)); // NOI18N CachjBT.setForeground(new java.awt.Color(0, 153, 204)); CachjBT.setText("cachier"); CachjBT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CachjBTActionPerformed(evt); } }); UtilBt.setFont(new java.awt.Font("Times New Roman", 3, 24)); // NOI18N UtilBt.setForeground(new java.awt.Color(0, 153, 204)); UtilBt.setText("utilisateur"); UtilBt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UtilBtActionPerformed(evt); } }); RetjBT.setFont(new java.awt.Font("Times New Roman", 3, 24)); // NOI18N RetjBT.setForeground(new java.awt.Color(0, 153, 204)); RetjBT.setText("Retour"); RetjBT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RetjBTActionPerformed(evt); } }); ProdjBT.setFont(new java.awt.Font("Times New Roman", 3, 24)); // NOI18N ProdjBT.setForeground(new java.awt.Color(0, 153, 204)); ProdjBT.setText("Produit"); ProdjBT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ProdjBTActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(134, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(RetjBT, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ProdjBT, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(UtilBt, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(CachjBT, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(97, 97, 97)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(PRINCIPALjLabel) .addGap(131, 131, 131)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(PRINCIPALjLabel) .addGap(18, 18, 18) .addComponent(UtilBt) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ProdjBT) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CachjBT) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(RetjBT) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// //GEN-END:initComponents private void RetjBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RetjBTActionPerformed Login a = new Login(); a.setVisible(true); this.dispose(); }//GEN-LAST:event_RetjBTActionPerformed private void UtilBtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UtilBtActionPerformed Utilisateur u = new Utilisateur();//le nom de classe qui va s'afficher u.setVisible(true); }//GEN-LAST:event_UtilBtActionPerformed private void CachjBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CachjBTActionPerformed Cachier c = new Cachier(); c.setVisible(true); }//GEN-LAST:event_CachjBTActionPerformed private void ProdjBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ProdjBTActionPerformed Produit i = new Produit(); i.setVisible(true); }//GEN-LAST:event_ProdjBTActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Principale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Principale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Principale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Principale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Principale().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton CachjBT; private javax.swing.JLabel PRINCIPALjLabel; private javax.swing.JButton ProdjBT; private javax.swing.JButton RetjBT; private javax.swing.JButton UtilBt; // End of variables declaration//GEN-END:variables }