swiixz | Bonjour à tous, après plusieurs heures de galere et de recherche je n'ai toujours pas trouver comment afficher une Jinternalframe dans ma frame principale.
J'ai une appli a faire, j'ai une frame principale dans laquelle il y a un panel sur lequel il y a une barre d'outils et un Jdesktoppane. Tout le reste de mon affichage est construit dans plusieurs Jinternalframe et suivant les menus que je choisi telle ou telle Jinternalframe doit s'afficher. Seul probleme je n'arrive pas à faire afficher la moindre jinternalframe. Si quelqu'un pouvait m'aider ce serait gentil car je suis vraiment en pleine galere et debute tout juste le java.
Merci d'avance.
Ma frame principale:
Code :
- import java.awt.Dimension;
- import java.awt.GraphicsEnvironment;
- import java.awt.Rectangle;
- import javax.swing.JButton;
- import javax.swing.JDesktopPane;
- import javax.swing.JFrame;
- import javax.swing.JMenu;
- import javax.swing.JMenuBar;
- import javax.swing.JMenuItem;
- import javax.swing.JPanel;
- import javax.swing.JToolBar;
- public class accueil {
- private JFrame accueil = null; // @jve:decl-index=0:visual-constraint="8,-6"
- private JPanel jContentPane = null;
- private JPanel panelhaut = null;
- private JButton jBpref1 = null;
- private JButton jBpref2 = null;
- private JButton jBpref3 = null;
- private JButton jBpref4 = null;
- private JButton jBpref5 = null;
- private JButton jBpref6 = null;
- private JButton jBpref7 = null;
- private JMenuBar jJMenuBar = null;
- private JMenu jMparametre = null;
- private JMenu jMpartenaire = null;
- private JMenu jMvente = null;
- private JMenu jMachat = null;
- private JMenu jMimpression = null;
- private JMenu jMrepsav = null;
- private JMenu jMoutils = null;
- private JMenuItem jMIaccueil = null;
- private JMenuItem jMIsociete = null;
- private JMenuItem jMIcomptabilite = null;
- private JMenu jMclient = null;
- private JMenu jMfournisseur = null;
- private JMenuItem jMfamclt = null;
- private JMenuItem jMIclient = null;
- private JMenuItem jMIfamfrs = null;
- private JMenuItem jMIfrs = null;
- private JMenuItem jMItechnicom = null;
- private JMenuItem jMIbanque = null;
- private JMenuItem jMIaide = null;
- private JMenuItem jMIdevis = null;
- private JMenuItem jMIcommande = null;
- private JMenuItem jMIbdl = null;
- private JMenuItem jMIfacture = null;
- private JMenuItem jMIaide2 = null;
- private JMenuItem jMIcmdfrs = null;
- private JMenuItem jMIbdr = null;
- private JMenuItem jMIfactfrs = null;
- private JMenuItem jMIaide3 = null;
- private JMenu jMlistvente = null;
- private JMenu jMlistachat = null;
- private JMenu jMhistovente = null;
- private JMenu jMhistoachat = null;
- private JMenu jMhistoclt = null;
- private JMenu jMhistofrs = null;
- private JMenu jMstate = null;
- private JMenuItem jMIreparation = null;
- private JMenuItem jMIreception = null;
- private JMenuItem jMIenvoi = null;
- private JMenuItem jMIsauivie = null;
- private JMenuItem jMIaide4 = null;
- private JMenu jMarticle = null;
- private JMenu jMimport = null;
- private JMenuItem jMIfamart = null;
- private JMenuItem jMIarticle = null;
- private JMenuItem jMIfamartI = null;
- private JMenuItem jMIartI = null;
- private JMenuItem jMIremisebanque = null;
- private JMenuItem jMIreglrel = null;
- private JMenuItem jMIinventaire = null;
- private JMenuItem jMItranscompt = null;
- private JMenuItem jMIaide5 = null;
- private JMenuItem jMIfamcltI = null;
- private JMenuItem jMIcltI = null;
- private JMenuItem jMIfamfrsI = null;
- private JMenuItem jMIfrsI = null;
- private JToolBar Jtoolbar = null;
- JDesktopPane jDPaccframe = null;
- /**
- * This method initializes accueil
- *
- * @return javax.swing.JFrame
- */
- private JFrame getAccueil() {
- if (accueil == null) {
- accueil = new JFrame();
- //accueil.setSize(new Dimension(1024, 764));
- GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
- Rectangle bounds = graphicsEnvironment .getMaximumWindowBounds();
- accueil.setBounds(bounds);
- accueil.setJMenuBar(getJJMenuBar());
- accueil.setTitle("Gescom" );
- accueil.setName("accueil" );
- accueil.setResizable(false);
- accueil.setContentPane(getJContentPane());
- accueil.setVisible(true);
- accueil.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
- return accueil;
- }
- /**
- * This method initializes jContentPane
- *
- * @return javax.swing.JPanel
- */
- private JPanel getJContentPane() {
- if (jContentPane == null) {
- jContentPane = new JPanel();
- jContentPane.setLayout(null);
- jContentPane.add(getPanelhaut(), null);
- }
- return jContentPane;
- }
- /**
- * This method initializes panelhaut
- *
- * @return javax.swing.JPanel
- */
- private JPanel getPanelhaut() {
- if (panelhaut == null) {
- panelhaut = new JPanel();
- panelhaut.setLayout(null);
- panelhaut.setBounds(new Rectangle(-1, 0, 1019, 667));
- panelhaut.add(getJtoolbar(), null);
- panelhaut.add(getJDPaccframe(), null);
- }
- return panelhaut;
- }
- /**
- * This method initializes jBpref1
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref1() {
- if (jBpref1 == null) {
- jBpref1 = new JButton();
- jBpref1.setSize(new Dimension(50, 30));
- jBpref1.setText("pref1" );
- }
- return jBpref1;
- }
- /**
- * This method initializes jBpref2
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref2() {
- if (jBpref2 == null) {
- jBpref2 = new JButton();
- jBpref2.setSize(new Dimension(50, 30));
- jBpref2.setText("pref2" );
- }
- return jBpref2;
- }
- /**
- * This method initializes jBpref3
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref3() {
- if (jBpref3 == null) {
- jBpref3 = new JButton();
- jBpref3.setSize(new Dimension(50, 30));
- jBpref3.setText("pref3" );
- }
- return jBpref3;
- }
- /**
- * This method initializes jBpref4
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref4() {
- if (jBpref4 == null) {
- jBpref4 = new JButton();
- jBpref4.setSize(new Dimension(50, 30));
- jBpref4.setText("pref4" );
- }
- return jBpref4;
- }
- /**
- * This method initializes jBpref5
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref5() {
- if (jBpref5 == null) {
- jBpref5 = new JButton();
- jBpref5.setSize(new Dimension(50, 30));
- jBpref5.setText("pref5" );
- }
- return jBpref5;
- }
- /**
- * This method initializes jBpref6
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref6() {
- if (jBpref6 == null) {
- jBpref6 = new JButton();
- jBpref6.setSize(new Dimension(50, 30));
- jBpref6.setText("pref6" );
- }
- return jBpref6;
- }
- /**
- * This method initializes jBpref7
- *
- * @return javax.swing.JButton
- */
- private JButton getJBpref7() {
- if (jBpref7 == null) {
- jBpref7 = new JButton();
- jBpref7.setSize(new Dimension(50, 30));
- jBpref7.setText("pref7" );
- }
- return jBpref7;
- }
- /**
- * This method initializes jJMenuBar
- *
- * @return javax.swing.JMenuBar
- */
- private JMenuBar getJJMenuBar() {
- if (jJMenuBar == null) {
- jJMenuBar = new JMenuBar();
- jJMenuBar.add(getJMparametre());
- jJMenuBar.add(getJMpartenaire());
- jJMenuBar.add(getJMvente());
- jJMenuBar.add(getJMachat());
- jJMenuBar.add(getJMimpression());
- jJMenuBar.add(getJMrepsav());
- jJMenuBar.add(getJMoutils());
- }
- return jJMenuBar;
- }
- /**
- * This method initializes jMparametre
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMparametre() {
- if (jMparametre == null) {
- jMparametre = new JMenu();
- jMparametre.setText("Paramètres" );
- jMparametre.add(getJMIaccueil());
- jMparametre.add(getJMIsociete());
- jMparametre.add(getJMIcomptabilite());
- }
- return jMparametre;
- }
- /**
- * This method initializes jMpartenaire
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMpartenaire() {
- if (jMpartenaire == null) {
- jMpartenaire = new JMenu();
- jMpartenaire.setText("Partenaires" );
- jMpartenaire.add(getJMclient());
- jMpartenaire.add(getJMfournisseur());
- jMpartenaire.add(getJMItechnicom());
- jMpartenaire.add(getJMIbanque());
- jMpartenaire.add(getJMIaide());
- }
- return jMpartenaire;
- }
- /**
- * This method initializes jMvente
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMvente() {
- if (jMvente == null) {
- jMvente = new JMenu();
- jMvente.setText("Ventes" );
- jMvente.add(getJMIdevis());
- jMvente.add(getJMIcommande());
- jMvente.add(getJMIbdl());
- jMvente.add(getJMIfacture());
- jMvente.add(getJMIaide2());
- }
- return jMvente;
- }
- /**
- * This method initializes jMachat
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMachat() {
- if (jMachat == null) {
- jMachat = new JMenu();
- jMachat.setText("Achats" );
- jMachat.add(getJMIcmdfrs());
- jMachat.add(getJMIbdr());
- jMachat.add(getJMIfactfrs());
- jMachat.add(getJMIaide3());
- }
- return jMachat;
- }
- /**
- * This method initializes jMimpression
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMimpression() {
- if (jMimpression == null) {
- jMimpression = new JMenu();
- jMimpression.setText("Impressions" );
- jMimpression.add(getJMlistvente());
- jMimpression.add(getJMlistachat());
- jMimpression.add(getJMhistovente());
- jMimpression.add(getJMhistoachat());
- jMimpression.add(getJMhistoclt());
- jMimpression.add(getJMhistofrs());
- jMimpression.add(getJMstate());
- }
- return jMimpression;
- }
- /**
- * This method initializes jMrepsav
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMrepsav() {
- if (jMrepsav == null) {
- jMrepsav = new JMenu();
- jMrepsav.setText("Réparations/SAV" );
- jMrepsav.add(getJMIreparation());
- jMrepsav.add(getJMIreception());
- jMrepsav.add(getJMIenvoi());
- jMrepsav.add(getJMIsauivie());
- jMrepsav.add(getJMIaide4());
- }
- return jMrepsav;
- }
- /**
- * This method initializes jMoutils
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMoutils() {
- if (jMoutils == null) {
- jMoutils = new JMenu();
- jMoutils.setText("Outils" );
- jMoutils.add(getJMarticle());
- jMoutils.add(getJMimport());
- jMoutils.add(getJMIremisebanque());
- jMoutils.add(getJMItranscompt());
- jMoutils.add(getJMIreglrel());
- jMoutils.add(getJMIinventaire());
- jMoutils.add(getJMIaide5());
- }
- return jMoutils;
- }
- /**
- * This method initializes jMIaccueil
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIaccueil() {
- if (jMIaccueil == null) {
- jMIaccueil = new JMenuItem();
- jMIaccueil.setText("Accueil" );
- jMIaccueil.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent e) {
- // TODO Auto-generated Event stub actionPerformed()
- }
- });
- }
- return jMIaccueil;
- }
- /**
- * This method initializes jMIsociete
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIsociete() {
- if (jMIsociete == null) {
- jMIsociete = new JMenuItem();
- jMIsociete.setText("Société" );
- }
- return jMIsociete;
- }
- /**
- * This method initializes jMIcomptabilite
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIcomptabilite() {
- if (jMIcomptabilite == null) {
- jMIcomptabilite = new JMenuItem();
- jMIcomptabilite.setText("Comptabilité" );
- }
- return jMIcomptabilite;
- }
- /**
- * This method initializes jMclient
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMclient() {
- if (jMclient == null) {
- jMclient = new JMenu();
- jMclient.setText("Clients" );
- jMclient.add(getJMfamclt());
- jMclient.add(getJMIclient());
- }
- return jMclient;
- }
- /**
- * This method initializes jMfournisseur
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMfournisseur() {
- if (jMfournisseur == null) {
- jMfournisseur = new JMenu();
- jMfournisseur.setText("Fournisseurs" );
- jMfournisseur.add(getJMIfamfrs());
- jMfournisseur.add(getJMIfrs());
- }
- return jMfournisseur;
- }
- /**
- * This method initializes jMfamclt
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMfamclt() {
- if (jMfamclt == null) {
- jMfamclt = new JMenuItem();
- jMfamclt.setText("Famille de clients" );
- }
- return jMfamclt;
- }
- /**
- * This method initializes jMIclient
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIclient() {
- if (jMIclient == null) {
- jMIclient = new JMenuItem();
- jMIclient.setText("Clients" );
- }
- return jMIclient;
- }
- /**
- * This method initializes jMIfamfrs
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfamfrs() {
- if (jMIfamfrs == null) {
- jMIfamfrs = new JMenuItem();
- jMIfamfrs.setText("Famille de fournisseurs" );
- }
- return jMIfamfrs;
- }
- /**
- * This method initializes jMIfrs
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfrs() {
- if (jMIfrs == null) {
- jMIfrs = new JMenuItem();
- jMIfrs.setText("Fournisseurs" );
- }
- return jMIfrs;
- }
- /**
- * This method initializes jMItechnicom
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMItechnicom() {
- if (jMItechnicom == null) {
- jMItechnicom = new JMenuItem();
- jMItechnicom.setText("Commerciaux/techniciens" );
- }
- return jMItechnicom;
- }
- /**
- * This method initializes jMIbanque
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIbanque() {
- if (jMIbanque == null) {
- jMIbanque = new JMenuItem();
- jMIbanque.setText("Banques" );
- }
- return jMIbanque;
- }
- /**
- * This method initializes jMIaide
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIaide() {
- if (jMIaide == null) {
- jMIaide = new JMenuItem();
- jMIaide.setText("Aide" );
- }
- return jMIaide;
- }
- /**
- * This method initializes jMIdevis
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIdevis() {
- if (jMIdevis == null) {
- jMIdevis = new JMenuItem();
- jMIdevis.setText("Devis" );
- }
- return jMIdevis;
- }
- /**
- * This method initializes jMIcommande
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIcommande() {
- if (jMIcommande == null) {
- jMIcommande = new JMenuItem();
- jMIcommande.setText("Commandes" );
- }
- return jMIcommande;
- }
- /**
- * This method initializes jMIbdl
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIbdl() {
- if (jMIbdl == null) {
- jMIbdl = new JMenuItem();
- jMIbdl.setText("Bons de livraison" );
- }
- return jMIbdl;
- }
- /**
- * This method initializes jMIfacture
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfacture() {
- if (jMIfacture == null) {
- jMIfacture = new JMenuItem();
- jMIfacture.setText("Factures" );
- }
- return jMIfacture;
- }
- /**
- * This method initializes jMIaide2
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIaide2() {
- if (jMIaide2 == null) {
- jMIaide2 = new JMenuItem();
- jMIaide2.setText("Aide" );
- }
- return jMIaide2;
- }
- /**
- * This method initializes jMIcmdfrs
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIcmdfrs() {
- if (jMIcmdfrs == null) {
- jMIcmdfrs = new JMenuItem();
- jMIcmdfrs.setText("Commandes fournisseurs" );
- }
- return jMIcmdfrs;
- }
- /**
- * This method initializes jMIbdr
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIbdr() {
- if (jMIbdr == null) {
- jMIbdr = new JMenuItem();
- jMIbdr.setText("Bons de reception" );
- }
- return jMIbdr;
- }
- /**
- * This method initializes jMIfactfrs
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfactfrs() {
- if (jMIfactfrs == null) {
- jMIfactfrs = new JMenuItem();
- jMIfactfrs.setText("Factures fournisseurs" );
- }
- return jMIfactfrs;
- }
- /**
- * This method initializes jMIaide3
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIaide3() {
- if (jMIaide3 == null) {
- jMIaide3 = new JMenuItem();
- jMIaide3.setText("Aide" );
- }
- return jMIaide3;
- }
- /**
- * This method initializes jMlistvente
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMlistvente() {
- if (jMlistvente == null) {
- jMlistvente = new JMenu();
- jMlistvente.setText("Listing des ventes" );
- }
- return jMlistvente;
- }
- /**
- * This method initializes jMlistachat
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMlistachat() {
- if (jMlistachat == null) {
- jMlistachat = new JMenu();
- jMlistachat.setText("Listing des achats" );
- }
- return jMlistachat;
- }
- /**
- * This method initializes jMhistovente
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMhistovente() {
- if (jMhistovente == null) {
- jMhistovente = new JMenu();
- jMhistovente.setText("Historique des ventes" );
- }
- return jMhistovente;
- }
- /**
- * This method initializes jMhistoachat
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMhistoachat() {
- if (jMhistoachat == null) {
- jMhistoachat = new JMenu();
- jMhistoachat.setText("Historique des achats" );
- }
- return jMhistoachat;
- }
- /**
- * This method initializes jMhistoclt
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMhistoclt() {
- if (jMhistoclt == null) {
- jMhistoclt = new JMenu();
- jMhistoclt.setText("Historique des clients" );
- }
- return jMhistoclt;
- }
- /**
- * This method initializes jMhistofrs
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMhistofrs() {
- if (jMhistofrs == null) {
- jMhistofrs = new JMenu();
- jMhistofrs.setText("historique des fournisseurs" );
- }
- return jMhistofrs;
- }
- /**
- * This method initializes jMstate
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMstate() {
- if (jMstate == null) {
- jMstate = new JMenu();
- jMstate.setText("Statistiques" );
- }
- return jMstate;
- }
- /**
- * This method initializes jMIreparation
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIreparation() {
- if (jMIreparation == null) {
- jMIreparation = new JMenuItem();
- jMIreparation.setText("Réparations" );
- }
- return jMIreparation;
- }
- /**
- * This method initializes jMIreception
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIreception() {
- if (jMIreception == null) {
- jMIreception = new JMenuItem();
- jMIreception.setText("Réceptions SAV" );
- }
- return jMIreception;
- }
- /**
- * This method initializes jMIenvoi
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIenvoi() {
- if (jMIenvoi == null) {
- jMIenvoi = new JMenuItem();
- jMIenvoi.setText("Envoie SAV" );
- }
- return jMIenvoi;
- }
- /**
- * This method initializes jMIsauivie
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIsauivie() {
- if (jMIsauivie == null) {
- jMIsauivie = new JMenuItem();
- jMIsauivie.setText("Suivie SAV" );
- }
- return jMIsauivie;
- }
- /**
- * This method initializes jMIaide4
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIaide4() {
- if (jMIaide4 == null) {
- jMIaide4 = new JMenuItem();
- jMIaide4.setText("Aide" );
- }
- return jMIaide4;
- }
- /**
- * This method initializes jMarticle
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMarticle() {
- if (jMarticle == null) {
- jMarticle = new JMenu();
- jMarticle.setText("Articles" );
- jMarticle.add(getJMIfamart());
- jMarticle.add(getJMIarticle());
- }
- return jMarticle;
- }
- /**
- * This method initializes jMimport
- *
- * @return javax.swing.JMenu
- */
- private JMenu getJMimport() {
- if (jMimport == null) {
- jMimport = new JMenu();
- jMimport.setText("Import" );
- jMimport.add(getJMIfamartI());
- jMimport.add(getJMIartI());
- jMimport.add(getJMIfamcltI());
- jMimport.add(getJMIcltI());
- jMimport.add(getJMIfamfrsI());
- jMimport.add(getJMIfrsI());
- }
- return jMimport;
- }
- /**
- * This method initializes jMIfamart
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfamart() {
- if (jMIfamart == null) {
- jMIfamart = new JMenuItem();
- jMIfamart.setText("Famille d'articles" );
- }
- return jMIfamart;
- }
- /**
- * This method initializes jMIarticle
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIarticle() {
- if (jMIarticle == null) {
- jMIarticle = new JMenuItem();
- jMIarticle.setText("Articles" );
- }
- return jMIarticle;
- }
- /**
- * This method initializes jMIfamartI
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfamartI() {
- if (jMIfamartI == null) {
- jMIfamartI = new JMenuItem();
- jMIfamartI.setText("Famille d'articles" );
- }
- return jMIfamartI;
- }
- /**
- * This method initializes jMIartI
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIartI() {
- if (jMIartI == null) {
- jMIartI = new JMenuItem();
- jMIartI.setText("Articles" );
- }
- return jMIartI;
- }
- /**
- * This method initializes jMIremisebanque
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIremisebanque() {
- if (jMIremisebanque == null) {
- jMIremisebanque = new JMenuItem();
- jMIremisebanque.setText("Remises en banque" );
- }
- return jMIremisebanque;
- }
- /**
- * This method initializes jMIreglrel
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIreglrel() {
- if (jMIreglrel == null) {
- jMIreglrel = new JMenuItem();
- jMIreglrel.setText("Règlements/relances clients" );
- }
- return jMIreglrel;
- }
- /**
- * This method initializes jMIinventaire
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIinventaire() {
- if (jMIinventaire == null) {
- jMIinventaire = new JMenuItem();
- jMIinventaire.setText("Inventaire" );
- }
- return jMIinventaire;
- }
- /**
- * This method initializes jMItranscompt
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMItranscompt() {
- if (jMItranscompt == null) {
- jMItranscompt = new JMenuItem();
- jMItranscompt.setText("Transferts comptables" );
- }
- return jMItranscompt;
- }
- /**
- * This method initializes jMIaide5
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIaide5() {
- if (jMIaide5 == null) {
- jMIaide5 = new JMenuItem();
- jMIaide5.setText("Aide" );
- }
- return jMIaide5;
- }
- /**
- * This method initializes jMIfamcltI
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfamcltI() {
- if (jMIfamcltI == null) {
- jMIfamcltI = new JMenuItem();
- jMIfamcltI.setText("Famille de clients" );
- }
- return jMIfamcltI;
- }
- /**
- * This method initializes jMIcltI
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIcltI() {
- if (jMIcltI == null) {
- jMIcltI = new JMenuItem();
- jMIcltI.setText("Clients" );
- }
- return jMIcltI;
- }
- /**
- * This method initializes jMIfamfrsI
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfamfrsI() {
- if (jMIfamfrsI == null) {
- jMIfamfrsI = new JMenuItem();
- jMIfamfrsI.setText("Famille de fournisseurs" );
- }
- return jMIfamfrsI;
- }
- /**
- * This method initializes jMIfrsI
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getJMIfrsI() {
- if (jMIfrsI == null) {
- jMIfrsI = new JMenuItem();
- jMIfrsI.setText("Fournisseurs" );
- }
- return jMIfrsI;
- }
- /**
- * This method initializes Jtoolbar
- *
- * @return javax.swing.JToolBar
- */
- private JToolBar getJtoolbar() {
- if (Jtoolbar == null) {
- Jtoolbar = new JToolBar();
- Jtoolbar.setBounds(new Rectangle(0, 0, 1020, 25));
- Jtoolbar.setFloatable(false);
- Jtoolbar.add(getJBpref1());
- Jtoolbar.add(getJBpref2());
- Jtoolbar.add(getJBpref3());
- Jtoolbar.add(getJBpref4());
- Jtoolbar.add(getJBpref5());
- Jtoolbar.add(getJBpref6());
- Jtoolbar.add(getJBpref7());
- }
- return Jtoolbar;
- }
- public JDesktopPane getJDPaccframe() {
- if (jDPaccframe == null) {
- jDPaccframe = new JDesktopPane();
- jDPaccframe.setBounds(new Rectangle(1, 24, 1017, 644));
- }
- return jDPaccframe;
- }
- public static void main(String[] args){
- accueil test = new accueil();
- test.getAccueil();
- }
- } // @jve:decl-index=0:visual-constraint="35,728"
|
Une de mes internalframe:
Code :
- import java.awt.Dimension;
- import java.awt.Rectangle;
- import javax.swing.JInternalFrame;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.JTextArea;
- public class stglobale {
- private JInternalFrame jIFstglobale = null; // @jve:decl-index=0:visual-constraint="104,38"
- private JPanel jCPstat = null; // @jve:decl-index=0:visual-constraint="10,10"
- private JLabel jLabel = null;
- private JLabel jLabel1 = null;
- private JLabel jLabel2 = null;
- private JLabel jLabel3 = null;
- private JLabel jLabel4 = null;
- private JLabel jLabel5 = null;
- private JLabel jLabel6 = null;
- private JLabel jLabel7 = null;
- private JLabel jLabel8 = null;
- private JTextArea jTextArea = null;
- private JTextArea jTextArea1 = null;
- private JTextArea jTextArea2 = null;
- private JTextArea jTextArea3 = null;
- /**
- * This method initializes jIFstglobale
- *
- * @return javax.swing.JInternalFrame
- */
- private JInternalFrame getJIFstglobale() {
- if (jIFstglobale == null) {
- jIFstglobale = new JInternalFrame();
- jIFstglobale.setClosable(true);
- jIFstglobale.setTitle("Statistiques globales" );
- jIFstglobale.setBounds(new Rectangle(1, 24, 1017, 644));
- jIFstglobale.setVisible(true);
- jIFstglobale.setContentPane(getJCPstat());
- }
- return jIFstglobale;
- }
- /**
- * This method initializes jCPstat
- *
- * @return javax.swing.JPanel
- */
- private JPanel getJCPstat() {
- if (jCPstat == null) {
- jLabel8 = new JLabel();
- jLabel8.setBounds(new Rectangle(370, 105, 234, 16));
- jLabel8.setText("xxxxxxxx" );
- jLabel7 = new JLabel();
- jLabel7.setBounds(new Rectangle(369, 60, 234, 16));
- jLabel7.setText("xxxxxxxxx" );
- jLabel6 = new JLabel();
- jLabel6.setBounds(new Rectangle(8, 60, 325, 16));
- jLabel6.setText("Chiffre d'affaire de l'année en cours" );
- jLabel5 = new JLabel();
- jLabel5.setBounds(new Rectangle(8, 106, 325, 16));
- jLabel5.setText("Chiffre d'affaire de l'année précédente" );
- jLabel4 = new JLabel();
- jLabel4.setBounds(new Rectangle(8, 150, 325, 16));
- jLabel4.setText("Meilleurs fournisseurs sur les 12 derniers mois" );
- jLabel3 = new JLabel();
- jLabel3.setBounds(new Rectangle(9, 195, 325, 16));
- jLabel3.setText("Meilleurs clients sur les 12 deriners mois" );
- jLabel2 = new JLabel();
- jLabel2.setBounds(new Rectangle(8, 240, 325, 16));
- jLabel2.setText("Articles les plus vendus sur les 12 derniers mois" );
- jLabel1 = new JLabel();
- jLabel1.setBounds(new Rectangle(9, 285, 325, 16));
- jLabel1.setText("Articles SAV sur les 12 derniers mois" );
- jLabel = new JLabel();
- jLabel.setText("Désignation Chiffre d'affaire" );
- jLabel.setBounds(new Rectangle(369, 131, 234, 16));
- jCPstat = new JPanel();
- jCPstat.setLayout(null);
- jCPstat.setBounds(new Rectangle(0, -1, 732, 371));
- jCPstat.add(jLabel, null);
- jCPstat.add(jLabel1, null);
- jCPstat.add(jLabel2, null);
- jCPstat.add(jLabel3, null);
- jCPstat.add(jLabel4, null);
- jCPstat.add(jLabel5, null);
- jCPstat.add(jLabel6, null);
- jCPstat.add(jLabel7, null);
- jCPstat.add(jLabel8, null);
- jCPstat.add(getJTextArea(), null);
- jCPstat.add(getJTextArea1(), null);
- jCPstat.add(getJTextArea2(), null);
- jCPstat.add(getJTextArea3(), null);
- }
- return jCPstat;
- }
- private JTextArea getJTextArea() {
- if (jTextArea == null) {
- jTextArea = new JTextArea();
- jTextArea.setBounds(new Rectangle(369, 240, 234, 31));
- }
- return jTextArea;
- }
- /**
- * This method initializes jTextArea1
- *
- * @return javax.swing.JTextArea
- */
- private JTextArea getJTextArea1() {
- if (jTextArea1 == null) {
- jTextArea1 = new JTextArea();
- jTextArea1.setBounds(new Rectangle(369, 195, 234, 31));
- }
- return jTextArea1;
- }
- /**
- * This method initializes jTextArea2
- *
- * @return javax.swing.JTextArea
- */
- private JTextArea getJTextArea2() {
- if (jTextArea2 == null) {
- jTextArea2 = new JTextArea();
- jTextArea2.setBounds(new Rectangle(369, 150, 234, 31));
- }
- return jTextArea2;
- }
- /**
- * This method initializes jTextArea3
- *
- * @return javax.swing.JTextArea
- */
- private JTextArea getJTextArea3() {
- if (jTextArea3 == null) {
- jTextArea3 = new JTextArea();
- jTextArea3.setBounds(new Rectangle(369, 285, 234, 31));
- }
- return jTextArea3;
- }
- }
|
|