IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

AWT/Swing Java Discussion :

JtabbedPane et Jpanel


Sujet :

AWT/Swing Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    67
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 67
    Par défaut JtabbedPane et Jpanel
    slt !!!!!

    j'ai un petit soucis depuis 1 semaine je n'arrive pas a ecrire dans des labels donc je m'explique ........

    mon programme à des onglets et chaque onglets hérite d'une classe qui est en extends JPanel donc 2 onglets et 2 classes ......... dans le premier onglet lorsque je clique sur un JRadioButton je récupére un String qui est automatiquement attribuer a mes fonctions qui eux ce trouve dans le deuxiéme onglet ...... mais lorsque je clique sur le deuxiéme onglet je n'ai rien d'afficher dans mes labels par contre pour vérifier que mon programme marche bien j'ai attribué à chaque labels un System.out.print(); et tous marche a merveille sauf l'affiche qui est vide ..... pourquoi l'affichage ne marche pas ??? .......

    petit bout de code de ma Classe informations c'est mon JRadioButton ....
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    private void getJrB(String[] t,String[] w) {
             a = 16;
            ButtonGroup group = new ButtonGroup();
            for (int i = 0;i < t.length && i<w.length;i++) {
                Pers1 += 1;
                 a += 22;
            final JRadioButton rb = new JRadioButton(t[i]);
            rb.setBounds(new Rectangle(5, a, 20, 23));
            rb.setName("Pers1_"+Pers1);
            rb.setText(w[i]);
            jPanel.add(rb);
            group.add(rb);
            jPanel.repaint();
            rb.addItemListener(new java.awt.event.ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                   if (e.getStateChange() == ItemEvent.SELECTED) {
                    JRadioButton obj = (JRadioButton)e.getItem();
                    //JOptionPane.showMessageDialog(null,"type :"+obj.getText());
                    //ID = obj.getText();
                    Structure_P1 wb = new Structure_P1();
                    wb.BootFonct(obj.getText());
                    //tg.setText(obj.getText());
                    } 
     
                }
            }
            );
     
            }
            a = 0;
        }
    ma classe Structure-P1 qui elle dois affiché tous mes résultat ........
    je n'ai laissé que 2 system.out.print(); dans le code car trop de caractére ....
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
     
    public class Structure_P1 extends JPanel{
     
        private static final long serialVersionUID = 1L;
     
        private JPanel jPanel = null;
        private JButton jb = null;
     
        private JLabel LCV = getL(600, 100, 92, 40,"CV"); //tous les label sont créer de la même façons
        public JLabel azer = null;
        private JScrollPane js = null;
        private org.jdom.Document document;
        private Element racine;
        private String Double,pre,ReducCons1,ReducVoy1;
        private String ReducCons2,ReducCons3,ReducVoy2,ReducVoy3;
        private String a,stockvoy,stockcons;
        String[] strDate = new String[2];
        //String ID = "76";
        private int ConvertIntES,ConvertIntCV,stress,stress2,stress3,reduc2,reduc,dizaine,
                unite,compt,compt2,maxcompt=0,maxcompt2=0,AddCons=0,AddVoy=0,AddVoy1=0,AddCons1=0,
                AddVoy2=0,AddCons2=0,AddVoy3=0,AddCons3=0,AddVoy4=0,AddCons4=0,NomVoy=0,NomCons=0,Prenom1Voy=0,Prenom1Cons=0,
                Tab = 0,Tab1 = 0,Tab2 = 0,Tab3 = 0,Tab4 = 0,Tab5 = 0,Tab6 = 0,Tab7 = 0,Tab8 = 0;
        //informations id = new informations();
     
        private JLabel getL(int x, int y, int l,int h, String T) {
            JLabel L = null;
            if(L==null) {
                L = new JLabel();
                L.setBounds(new Rectangle(x, y, l, h));
                //L.setText(T);
                L.setAutoscrolls(true);
                L.setForeground(Color.blue);
                L.setBorder(javax.swing.BorderFactory.createTitledBorder(T));
            }
            return L;
        }
     
        public void BootFonct(String po)
        {
                        AfficheStructure(po);
        }
     
        public JScrollPane JS() {
            if (js == null) {
                js = new JScrollPane();
                js.setViewportView(getJPanel());
            }
            return js;
        }
     
        public JPanel getJPanel() {
            informations qs = new informations();
            if (jPanel == null) {
                azer = new JLabel();
                azer.setBounds(new Rectangle(500, 500, 100, 30));
                azer.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
                jPanel = new JPanel();
                jPanel.setLayout(null);
                jPanel.add(getJButton1());
                jPanel.add(LnomR7);
                jPanel.add(Lprenom1R7);
                jPanel.add(Lprenom2R7);
                jPanel.add(Lprenom3R7);
                jPanel.add(Lprenom4R7);
                jPanel.add(LnomR5);
                jPanel.add(Lprenom1R5);
                jPanel.add(Lprenom2R5);
                jPanel.add(Lprenom3R5);
                jPanel.add(Lprenom4R5);
                jPanel.add(LnomR3);
                jPanel.add(Lprenom1R3);
                jPanel.add(Lprenom2R3);
                jPanel.add(Lprenom3R3);
                jPanel.add(Lprenom4R3);
                jPanel.add(LnomR1);
                jPanel.add(Lprenom1R1);
                jPanel.add(Lprenom2R1);
                jPanel.add(Lprenom3R1);
                jPanel.add(Lprenom4R1);
                jPanel.add(Lnom);
                jPanel.add(Lprenom1);
                jPanel.add(Lprenom2);
                jPanel.add(Lprenom3);
                jPanel.add(Lprenom4);
                jPanel.add(LnomR2);
                jPanel.add(Lprenom1R2);
                jPanel.add(Lprenom2R2);
                jPanel.add(Lprenom3R2);
                jPanel.add(Lprenom4R2);
                jPanel.add(LnomR4);
                jPanel.add(Lprenom1R4);
                jPanel.add(Lprenom2R4);
                jPanel.add(Lprenom3R4);
                jPanel.add(Lprenom4R4);
                jPanel.add(LnomR6);
                jPanel.add(Lprenom1R6);
                jPanel.add(Lprenom2R6);
                jPanel.add(Lprenom3R6);
                jPanel.add(Lprenom4R6);
                jPanel.add(LnomR8);
                jPanel.add(Lprenom1R8);
                jPanel.add(Lprenom2R8);
                jPanel.add(Lprenom3R8);
                jPanel.add(Lprenom4R8);
                jPanel.add(Ladd7);
                jPanel.add(Ladd5);
                jPanel.add(Ladd3);
                jPanel.add(Ladd1);
                jPanel.add(Ladd);
                jPanel.add(Ladd2);
                jPanel.add(Ladd4);
                jPanel.add(Ladd6);
                jPanel.add(Ladd8);
                jPanel.add(LEXP);
                jPanel.add(LEXP2);
                jPanel.add(LNA);
                jPanel.add(LAD);
                jPanel.add(LES);
                jPanel.add(LIS);
                jPanel.add(LMI);
                jPanel.add(LNF);
                jPanel.add(LCV);
                jPanel.add(azer);
                jPanel.add(getJT("azer"));
                jPanel.setPreferredSize(new Dimension (980,500));
            }
            return jPanel;
        }
     
        private void getxml() {
            //L'on crée un instance du parseur SAXBuilder
            SAXBuilder xml = new SAXBuilder();
            try {
                //L'on crée un nouveau document JDOM avec en argumant le fichier XML
                //Le parsing est terminé ;)
                document = xml.build(new File("xml/therapeute.xml"));
     
     
            } catch(Exception e){
                JOptionPane.showMessageDialog(null, "Le fichier XML n'a pas etais trouvé l'application va s'arréter et aller verifier si votre xml existe @++ ... lol ... ");
                System.exit(0);
            }
     
            //L'on initialise un nouvel element racine avec l'element racine du document.
            racine = document.getRootElement();
        }
     
        private void AfficheStructure(String ID) {
            getxml();
            AddVoy3 = 0;
            AddVoy2 = 0;
            AddCons2 = 0;
            AddCons3 = 0;
            AddVoy1 = 0;
            AddCons1 = 0;
     
            List listEtudiants = racine.getChildren("therapeute");
            Iterator x = listEtudiants.iterator();
            while(x.hasNext()) {
                Element courant = (Element)x.next();
                Iterator x2 = courant.getChildren("patients").iterator();
                while(x2.hasNext()) {
                    Element courant2 = (Element)x2.next();
                    Iterator x3 = courant2.getChildren("patient").iterator();
                    while(x3.hasNext()) {
                        String[] strPrenom = new String[4];
                        int i=0;
                        Element courant3 = (Element)x3.next();
                        if (courant3.getAttributeValue("id").equals(ID)) {
                            strDate = courant3.getChild("date_naissance").getText().split("-");
                            if (courant3.getChild("nomjf").getText() != "") {
                                Lnom.setText(courant3.getChild("nomjf").getText());
                                System.out.print(courant3.getChild("nomjf").getText());
                                reduction(courant3.getChild("nomjf").getText());
                                LnomR7.setText(ReducVoy3);
                                LnomR5.setText(ReducVoy2);
                                LnomR3.setText(ReducVoy1);
                                LnomR1.setText(stockvoy);
                                //Lnom.setText(pre);
                                LnomR2.setText(stockcons);
                                LnomR4.setText(ReducCons1);
                                LnomR6.setText(ReducCons2);
                                LnomR8.setText(ReducCons3);
                            } else {
                                Lnom.setText(courant3.getChild("nom").getText());
                                System.out.print(courant3.getChild("nom").getText());
                                reduction(courant3.getChild("nom").getText());
                                LnomR7.setText(ReducVoy3);
                                LnomR5.setText(ReducVoy2);
                                LnomR3.setText(ReducVoy1);
                                LnomR1.setText(stockvoy);
                                //Lnom.setText(pre);
                                LnomR2.setText(stockcons);
                                LnomR4.setText(ReducCons1);
                                LnomR6.setText(ReducCons2);
                                LnomR8.setText(ReducCons3);
                            }
     
                            NomVoy = StringToInt(ReducVoy1);
                            NomCons = StringToInt(ReducCons1);
     
                            Iterator x4 = courant3.getChildren("prenoms").iterator();
                            while(x4.hasNext()) {
                                Element courant4 = (Element)x4.next();
                                Iterator x5 = courant4.getChildren("prenom").iterator();
                                while(x5.hasNext()) {
                                    Element courant5 = (Element)x5.next();
                                    strPrenom[i] = courant5.getText();
                                    i++;
                                }
                                Lprenom1.setText(strPrenom[0]);
                                reduction(strPrenom[0]);
                                Lprenom1R7.setText(ReducVoy3);
                                Lprenom1R5.setText(ReducVoy2);
                                Lprenom1R3.setText(ReducVoy1);
                                Lprenom1R1.setText(stockvoy);
                                //Lprenom1.setText(pre);
                                Lprenom1R2.setText(stockcons);
                                Lprenom1R4.setText(ReducCons1);
                                Lprenom1R6.setText(ReducCons2);
                                Lprenom1R8.setText(ReducCons3);
     
                                Prenom1Voy = StringToInt(ReducVoy1);
                                Prenom1Cons = StringToInt(ReducCons1);
     
                                Lprenom2.setText(strPrenom[1]);
                                reduction(strPrenom[1]);
                                Lprenom2R7.setText(ReducVoy3);
                                Lprenom2R5.setText(ReducVoy2);
                                Lprenom2R3.setText(ReducVoy1);
                                Lprenom2R1.setText(stockvoy);
                                //Lprenom2.setText(pre);
                                Lprenom2R2.setText(stockcons);
                                Lprenom2R4.setText(ReducCons1);
                                Lprenom2R6.setText(ReducCons2);
                                Lprenom2R8.setText(ReducCons3);
     
                                Lprenom3.setText(strPrenom[2]);
                                reduction(strPrenom[2]);
                                Lprenom3R7.setText(ReducVoy3);
                                Lprenom3R5.setText(ReducVoy2);
                                Lprenom3R3.setText(ReducVoy1);
                                Lprenom3R1.setText(stockvoy);
                                //Lprenom3.setText(pre);
                                Lprenom3R2.setText(stockcons);
                                Lprenom3R4.setText(ReducCons1);
                                Lprenom3R6.setText(ReducCons2);
                                Lprenom3R8.setText(ReducCons3);
     
                                Lprenom4.setText(strPrenom[3]);
                                reduction(strPrenom[3]);
                                Lprenom4R7.setText(ReducVoy3);
                                Lprenom4R5.setText(ReducVoy2);
                                Lprenom4R3.setText(ReducVoy1);
                                Lprenom4R1.setText(stockvoy);
                                //Lprenom4.setText(pre);
                                Lprenom4R2.setText(stockcons);
                                Lprenom4R4.setText(ReducCons1);
                                Lprenom4R6.setText(ReducCons2);
                                Lprenom4R8.setText(ReducCons3);
     
                                if (LnomR7.getText() != "") {
                                    if (Lprenom1R7.getText() == "")
                                        Lprenom1R7.setText(Lprenom1R5.getText());
                                    if (Lprenom2R7.getText() == "")
                                        Lprenom2R7.setText(Lprenom2R5.getText());
                                    if (Lprenom3R7.getText() == "")
                                        Lprenom3R7.setText(Lprenom3R5.getText());
                                    if (Lprenom4R7.getText() == "")
                                        Lprenom4R7.setText(Lprenom4R5.getText());
                                }
                                if (LnomR8.getText() != "") {
                                    if (Lprenom1R8.getText() == "")
                                        Lprenom1R8.setText(Lprenom1R6.getText());
                                    if (Lprenom2R8.getText() == "")
                                        Lprenom2R8.setText(Lprenom2R6.getText());
                                    if (Lprenom3R8.getText() == "")
                                        Lprenom3R8.setText(Lprenom3R6.getText());
                                    if (Lprenom4R8.getText() == "")
                                        Lprenom4R8.setText(Lprenom4R6.getText());
                                }
     
                                if (Lprenom1R7.getText() != "") {
                                    if (LnomR7.getText() == "")
                                        LnomR7.setText(LnomR5.getText());
                                    if (Lprenom2R7.getText() == "")
                                        Lprenom2R7.setText(Lprenom2R5.getText());
                                    if (Lprenom3R7.getText() == "")
                                        Lprenom3R7.setText(Lprenom3R5.getText());
                                    if (Lprenom4R7.getText() == "")
                                        Lprenom4R7.setText(Lprenom4R5.getText());
                                }
                                if (Lprenom1R8.getText() != "") {
                                    if (LnomR8.getText() == "")
                                        LnomR8.setText(LnomR6.getText());
                                    if (Lprenom2R8.getText() == "")
                                        Lprenom2R8.setText(Lprenom2R6.getText());
                                    if (Lprenom3R8.getText() == "")
                                        Lprenom3R8.setText(Lprenom3R6.getText());
                                    if (Lprenom4R8.getText() == "")
                                        Lprenom4R8.setText(Lprenom4R6.getText());
                                }
     
                                if (Lprenom2R7.getText() != "") {
                                    if (Lprenom1R7.getText() == "")
                                        Lprenom1R7.setText(Lprenom1R5.getText());
                                    if (LnomR7.getText() == "")
                                        LnomR7.setText(LnomR5.getText());
                                    if (Lprenom3R7.getText() == "")
                                        Lprenom3R7.setText(Lprenom3R5.getText());
                                    if (Lprenom4R7.getText() == "")
                                        Lprenom4R7.setText(Lprenom4R5.getText());
                                }
                                if (Lprenom2R8.getText() != "") {
                                    if (Lprenom1R8.getText() == "")
                                        Lprenom1R8.setText(Lprenom1R6.getText());
                                    if (LnomR8.getText() == "")
                                        LnomR8.setText(LnomR6.getText());
                                    if (Lprenom3R8.getText() == "")
                                        Lprenom3R8.setText(Lprenom3R6.getText());
                                    if (Lprenom4R8.getText() == "")
                                        Lprenom4R8.setText(Lprenom4R6.getText());
                                }
     
                                if (Lprenom3R7.getText() != "") {
                                    if (Lprenom1R7.getText() == "")
                                        Lprenom1R7.setText(Lprenom1R5.getText());
                                    if (Lprenom2R7.getText() == "")
                                        Lprenom2R7.setText(Lprenom2R5.getText());
                                    if (LnomR7.getText() == "")
                                        LnomR7.setText(LnomR5.getText());
                                    if (Lprenom4R7.getText() == "")
                                        Lprenom4R7.setText(Lprenom4R5.getText());
                                }
                                if (Lprenom3R8.getText() != "") {
                                    if (Lprenom1R8.getText() == "")
                                        Lprenom1R8.setText(Lprenom1R6.getText());
                                    if (Lprenom2R8.getText() == "")
                                        Lprenom2R8.setText(Lprenom2R6.getText());
                                    if (LnomR8.getText() == "")
                                        LnomR8.setText(LnomR6.getText());
                                    if (Lprenom4R8.getText() == "")
                                        Lprenom4R8.setText(Lprenom4R6.getText());
                                }
     
                                if (Lprenom4R7.getText() != "") {
                                    if (Lprenom1R7.getText() == "")
                                        Lprenom1R7.setText(Lprenom1R5.getText());
                                    if (Lprenom2R7.getText() == "")
                                        Lprenom2R7.setText(Lprenom2R5.getText());
                                    if (Lprenom3R7.getText() == "")
                                        Lprenom3R7.setText(Lprenom3R5.getText());
                                    if (LnomR7.getText() == "")
                                        LnomR7.setText(LnomR5.getText());
                                }
                                if (Lprenom4R8.getText() != "") {
                                    if (Lprenom1R8.getText() == "")
                                        Lprenom1R8.setText(Lprenom1R6.getText());
                                    if (Lprenom2R8.getText() == "")
                                        Lprenom2R8.setText(Lprenom2R6.getText());
                                    if (Lprenom3R8.getText() == "")
                                        Lprenom3R8.setText(Lprenom3R6.getText());
                                    if (LnomR8.getText() == "")
                                        LnomR8.setText(LnomR6.getText());
                                }
                                if (LnomR7.getText() != "" && Lprenom1R7.getText() != ""  && Lprenom2R7.getText() != "" && Lprenom3R7.getText() != "" && Lprenom4R7.getText() != "") {
                                    int resultat = StringToInt(LnomR7.getText()) + StringToInt(Lprenom1R7.getText()) + StringToInt(Lprenom2R7.getText()) + StringToInt(Lprenom3R7.getText()) + StringToInt(Lprenom4R7.getText());
                                    Ladd7.setText(IntToString(resultat));
                                }
     
                                Ladd5.setText(IntToString(AddVoy3));
                                Ladd3.setText(IntToString(AddVoy2));
                                Ladd1.setText(IntToString(AddVoy1));
                                Ladd.setText(IntToString(AddCons1 + AddVoy1));
                                Ladd2.setText(IntToString(AddCons1));
                                Ladd4.setText(IntToString(AddCons2));
                                Ladd6.setText(IntToString(AddCons3));
     
                                if (LnomR8.getText() != "" && Lprenom1R8.getText() != ""  && Lprenom2R8.getText() != "" && Lprenom3R8.getText() != "" && Lprenom4R8.getText() != "") {
                                    int resultat2 = StringToInt(LnomR8.getText()) + StringToInt(Lprenom1R8.getText()) + StringToInt(Lprenom2R8.getText()) + StringToInt(Lprenom3R8.getText()) + StringToInt(Lprenom4R8.getText());
                                    Ladd8.setText(IntToString(resultat2));
                                } 
                            } 
                        } 
                    }
                }  
            }
        }

  2. #2
    Rédacteur
    Avatar de eclesia
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    2 111
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 2 111
    Par défaut
    je suppose que tu as deja fait tes 2 onglets avant qu'un click sur un radiobutton n'arrive.

    le probleme est la a mon avis :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    Structure_P1 wb = new Structure_P1();
    wb.BootFonct(obj.getText());
    tu fais un nouveau Structure_P1,qui n'est pas visible.
    tu dois utiliser celui qui existe deja.

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    67
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 67
    Par défaut
    slt !!!!

    effectivement tous mes onglets sont créer au démarrage de l'applications mais tu dis que appeler 2 foix un constructeur de la même classe peut causer probléme et d'utiliser le même constructeur ...... je sais pas comment utiliser le même construteur car celui-ci ce trouve dans une autre classe qui est la classe TabbedPanes et sinon le faite de construire l'onglet avant et de donner des informations aprés pourquoi ne reconstruit-il pas ma classe avec les nouvelles donnée ????? il faut m'aider car la je comprend pas car mon projet et fini tout marche nickel je dois juste réglé ce probléme il me reste que la semaine prochaine pour finir car mon stage sera fini et ensuite examin donc si vous pouvez me diriger car la je sature ....... merci de votre aide

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    67
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 67
    Par défaut
    slt !!!!!

    personne à une petite idée ou une orientation car la j'ai tjs pas trouvé j'ai tout chanboulé le code et rien je séche ......... merci de votre aide

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    67
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 67
    Par défaut
    slt !!!!!!!

    même en utilisant le même constructeur rien nada ....... please help !!!!!

  6. #6
    Rédacteur
    Avatar de eclesia
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    2 111
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 2 111
    Par défaut
    je ne te parle pas d'utiliser le même constructeur, mais d'utiliser le même OBJET.

    tu ne dois utiliser qu'un seul objet de classe : Structure_P1.


    en faisant : Structure_P1 wb = new Structure_P1();
    tu en fais un nouveau, hors tu n'en veux pas un nouveau tu veux celui qui est affiché, ce n'est pas pareil.

Discussions similaires

  1. JTabbedPane et JPanel (avec scrollbar)
    Par Askle dans le forum Agents de placement/Fenêtres
    Réponses: 10
    Dernier message: 27/12/2009, 20h22
  2. Récupérer JPanel dans un JScrollPane dans un JTabbedPane
    Par orochimaru13 dans le forum AWT/Swing
    Réponses: 2
    Dernier message: 16/05/2008, 11h02
  3. Superposition JPanel dans JTabbedPane
    Par rems033 dans le forum AWT/Swing
    Réponses: 9
    Dernier message: 23/06/2007, 13h13
  4. Réponses: 12
    Dernier message: 25/04/2007, 16h42
  5. Réponses: 1
    Dernier message: 29/11/2006, 03h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo