Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Miscellany
Friday, May 11th, 2012 at 2:29:25pm MDT 

  1. import javax.swing.JFrame;
  2. import javax.swing.JButton;
  3. import javax.swing.JPanel;
  4. import javax.swing.JLabel;
  5.  
  6. import java.awt.* ;
  7. import java.awt.event.* ;
  8.  
  9.  
  10. public class ProgrammeGestionJournal  implements ActionListener {
  11.   private JButton quitter;
  12.                            
  13.   private JButton gestionJournaliere;
  14.  
  15.   private JButton gestionDUnJournal;
  16.   private JPanel pan;
  17.  
  18.   public ProgrammeGestionJournal()
  19.   {
  20.      JFrame Fenetre = new JFrame();
  21.    
  22.      //cration du boutton "quitter"
  23.      
  24.      quitter = new JButton("quitter");
  25.      quitter.addActionListener(this)
  26.  
  27.      
  28.      //cration du boutton "gestion Journalire"
  29.      
  30.      gestionJournaliere = new JButton ("Gestion Journalire");
  31.      gestionJournaliere.addActionListener(this);
  32.      
  33.      //cration du boutton "Gestion d'un journal"
  34.      
  35.      gestionDUnJournal = new JButton ("Gestion D'un journal");
  36.      gestionDUnJournal.addActionListener(this);
  37.      
  38.      pan = new JPanel();
  39.    
  40.      pan.add(quitter);
  41.     pan.add(gestionJournaliere);
  42.      pan.add(gestionDUnJournal);
  43.  
  44.      Fenetre.setVisible(true);
  45.     Fenetre.setTitle("Gestion d'un journal");
  46.      Fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  47.     Fenetre.setSize(500, 500);
  48.      Fenetre.setContentPane(pan);
  49.   }
  50. /**
  51. * @param args
  52. */
  53.   public static void main(String[] args)
  54.   {
  55.      ProgrammeGestionJournal pgj = new ProgrammeGestionJournal();
  56.  
  57.   }
  58.  
  59.   public void actionPerformed( ActionEvent ae)
  60.   {
  61.      Object qui = ae.getSource();
  62.      if( qui == quitter )
  63.      {
  64.      //traitement bouton quitter
  65.         System.out.println("Traitement FIN");
  66.         System.exit(0);
  67.      }
  68.      
  69.      if(qui == gestionJournaliere)
  70.      {
  71.              
  72.          JPanel pan2 = new JPanel();
  73.          JButton nouveau = new JButton ("nouveau");
  74.          JButton supprimer = new JButton ("supprimer");
  75.          JButton liste = new JButton ("liste");
  76.          JButton modifier = new JButton ("modifier");
  77.          
  78.          pan.add(nouveau);
  79.          pan.add(supprimer);
  80.          pan.add(liste);
  81.          pan.add(modifier);
  82.          
  83.         System.out.println("Traitement gestion journalire");
  84.      }
  85.      
  86.      if(qui == gestionDUnJournal)
  87.      {
  88.         System.out.println("Traitement gestion d'un journal");
  89.      }
  90.   }
  91.  
  92.  
  93. }

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right fantasy-obligation