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

NetBeans Java Discussion :

[Debutant]Transférer une interface sous netbeans dans eclipse


Sujet :

NetBeans Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2008
    Messages : 13
    Points : 8
    Points
    8
    Par défaut [Debutant]Transférer une interface sous netbeans dans eclipse
    Bonjour, je suis donc débutant en java. Je travail sous eclipse mais j'ai créé une interface sous netbeans et j'aimerai la tranferer dans mon projet java. Au niveau du code généré automatiquement, je ne sais pas vraiment quoi prendre et où le mettre. Merci pour votre aide.

  2. #2
    Expert confirmé
    Avatar de Valère
    Profil pro
    Inscrit en
    Août 2005
    Messages
    1 334
    Détails du profil
    Informations personnelles :
    Âge : 49
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Août 2005
    Messages : 1 334
    Points : 4 740
    Points
    4 740
    Par défaut
    Bonjour,

    Il te suffit de copier le code source de ton interface (le fichier .java), dans ton projet Eclipse. Il faut aussi rajouter le jar SwingLayout*.jar dans le projet Eclipse.

    Attention, cette étape est irréversible: en fait, NB reconstruit les parties en bleu de la classe java à partir d'un fichier .form. Si tu modifies ces parties dans Eclipse te que tu recharge la classe dans NB:
    • Au mieux tes modifications seront remplacées par le code initial,
    • Au pire NB va planter


    Ma recommandation est de ne pas modifier les interfaces NB dans Eclipse.

    Valère
    Pensez au bouton
    Je ne répond pas aux questions techniques par email ou MP.

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2008
    Messages : 13
    Points : 8
    Points
    8
    Par défaut
    Merci pour ta réponse Valère, cependant je suis pas sure de tout bien comprendre. Mon interface Netbeans est en réalité composé de plusieurs fichiers java (6 meme si la plupart sont plus ou moins vides).

    Le principal est celui là:

    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
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    /*
     * AditView.java
     */
     
    package adit;
     
    import org.jdesktop.application.Action;
    import org.jdesktop.application.ResourceMap;
    import org.jdesktop.application.SingleFrameApplication;
    import org.jdesktop.application.FrameView;
    import org.jdesktop.application.TaskMonitor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.Timer;
    import javax.swing.Icon;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
     
    /**
     * The application's main frame.
     */
    public class AditView extends FrameView {
     
        public AditView(SingleFrameApplication app) {
            super(app);
     
            initComponents();
     
            // status bar initialization - message timeout, idle icon and busy animation, etc
            ResourceMap resourceMap = getResourceMap();
            int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
            messageTimer = new Timer(messageTimeout, new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    statusMessageLabel.setText("");
                }
            });
            messageTimer.setRepeats(false);
            int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
            for (int i = 0; i < busyIcons.length; i++) {
                busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
            }
            busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                    statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
                }
            });
            idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
            statusAnimationLabel.setIcon(idleIcon);
            progressBar.setVisible(false);
     
            // connecting action tasks to status bar via TaskMonitor
            TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
            taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent evt) {
                    String propertyName = evt.getPropertyName();
                    if ("started".equals(propertyName)) {
                        if (!busyIconTimer.isRunning()) {
                            statusAnimationLabel.setIcon(busyIcons[0]);
                            busyIconIndex = 0;
                            busyIconTimer.start();
                        }
                        progressBar.setVisible(true);
                        progressBar.setIndeterminate(true);
                    } else if ("done".equals(propertyName)) {
                        busyIconTimer.stop();
                        statusAnimationLabel.setIcon(idleIcon);
                        progressBar.setVisible(false);
                        progressBar.setValue(0);
                    } else if ("message".equals(propertyName)) {
                        String text = (String)(evt.getNewValue());
                        statusMessageLabel.setText((text == null) ? "" : text);
                        messageTimer.restart();
                    } else if ("progress".equals(propertyName)) {
                        int value = (Integer)(evt.getNewValue());
                        progressBar.setVisible(true);
                        progressBar.setIndeterminate(false);
                        progressBar.setValue(value);
                    }
                }
            });
        }
     
        @Action
        public void showAboutBox() {
            if (aboutBox == null) {
                JFrame mainFrame = AditApp.getApplication().getMainFrame();
                aboutBox = new AditAboutBox(mainFrame);
                aboutBox.setLocationRelativeTo(mainFrame);
            }
            AditApp.getApplication().show(aboutBox);
        }
     
        /** 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.
         */
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
     
            mainPanel = new javax.swing.JPanel();
            UserGroups = new javax.swing.JTabbedPane();
            jPanel1 = new javax.swing.JPanel();
            jComboBox1 = new javax.swing.JComboBox();
            jLabel2 = new javax.swing.JLabel();
            checkbox2 = new java.awt.Checkbox();
            checkbox3 = new java.awt.Checkbox();
            checkbox4 = new java.awt.Checkbox();
            checkbox1 = new java.awt.Checkbox();
            jLabel3 = new javax.swing.JLabel();
            jLabel1 = new javax.swing.JLabel();
            jPanel2 = new javax.swing.JPanel();
            jLabel4 = new javax.swing.JLabel();
            jLabel5 = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            jLabel6 = new javax.swing.JLabel();
            jTextField2 = new javax.swing.JTextField();
            jLabel7 = new javax.swing.JLabel();
            jTextField3 = new javax.swing.JTextField();
            jLabel8 = new javax.swing.JLabel();
            jTextField4 = new javax.swing.JTextField();
            jLabel9 = new javax.swing.JLabel();
            jTextField5 = new javax.swing.JTextField();
            jLabel10 = new javax.swing.JLabel();
            jTextField6 = new javax.swing.JTextField();
            jLabel11 = new javax.swing.JLabel();
            jTextField7 = new javax.swing.JTextField();
            jLabel12 = new javax.swing.JLabel();
            jTextField8 = new javax.swing.JTextField();
            jLabel13 = new javax.swing.JLabel();
            jTextField9 = new javax.swing.JTextField();
            jLabel14 = new javax.swing.JLabel();
            jComboBox2 = new javax.swing.JComboBox();
            jButton1 = new javax.swing.JButton();
            jLabel15 = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jList1 = new javax.swing.JList();
            jButton2 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            jPanel3 = new javax.swing.JPanel();
            jLabel16 = new javax.swing.JLabel();
            jScrollPane2 = new javax.swing.JScrollPane();
            jList2 = new javax.swing.JList();
            jButton4 = new javax.swing.JButton();
            jButton5 = new javax.swing.JButton();
            jPanel4 = new javax.swing.JPanel();
            jLabel17 = new javax.swing.JLabel();
            jScrollPane3 = new javax.swing.JScrollPane();
            jList3 = new javax.swing.JList();
            jButton6 = new javax.swing.JButton();
            jButton7 = new javax.swing.JButton();
            jButton8 = new javax.swing.JButton();
            menuBar = new javax.swing.JMenuBar();
            javax.swing.JMenu fileMenu = new javax.swing.JMenu();
            javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
            jMenu3 = new javax.swing.JMenu();
            jMenuItem9 = new javax.swing.JMenuItem();
            jMenuItem10 = new javax.swing.JMenuItem();
            javax.swing.JMenu helpMenu = new javax.swing.JMenu();
            javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
     
            mainPanel.setName("mainPanel"); // NOI18N
     
            UserGroups.setName("UserGroups"); // NOI18N
     
            jPanel1.setName("Editrightaccess"); // NOI18N
     
            jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Employee", "Engineer", "Traider", "Marketer" }));
            jComboBox1.setName("jComboBox1"); // NOI18N
     
            org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(adit.AditApp.class).getContext().getResourceMap(AditView.class);
            jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
            jLabel2.setName("jLabel2"); // NOI18N
     
            checkbox2.setLabel(resourceMap.getString("checkbox2.label")); // NOI18N
            checkbox2.setName("checkbox2"); // NOI18N
     
            checkbox3.setLabel(resourceMap.getString("checkbox3.label")); // NOI18N
            checkbox3.setName("checkbox3"); // NOI18N
     
            checkbox4.setLabel(resourceMap.getString("checkbox4.label")); // NOI18N
            checkbox4.setName("checkbox4"); // NOI18N
     
            checkbox1.setLabel(resourceMap.getString("checkbox1.label")); // NOI18N
            checkbox1.setName("checkbox1"); // NOI18N
     
            jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
            jLabel3.setName("jLabel3"); // NOI18N
     
            jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
            jLabel1.setForeground(resourceMap.getColor("jLabel1.foreground")); // NOI18N
            jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
            jLabel1.setMaximumSize(new java.awt.Dimension(99, 18));
            jLabel1.setMinimumSize(new java.awt.Dimension(99, 18));
            jLabel1.setName("jLabel1"); // NOI18N
            jLabel1.setPreferredSize(new java.awt.Dimension(99, 18));
     
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 419, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGap(123, 123, 123)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel2))
                            .addGap(30, 30, 30)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(checkbox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(checkbox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(checkbox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(checkbox1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel3))
                                    .addGap(110, 110, 110))))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGap(117, 117, 117)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap())
            );
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 343, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                            .addGap(48, 48, 48)
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(32, 32, 32))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel3)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(checkbox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(checkbox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(checkbox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                    .addComponent(checkbox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(164, Short.MAX_VALUE))
            );
     
            UserGroups.addTab(resourceMap.getString("Editrightaccess.TabConstraints.tabTitle"), jPanel1); // NOI18N
     
            jPanel2.setName("jPanel2"); // NOI18N
     
            jLabel4.setFont(resourceMap.getFont("jLabel4.font")); // NOI18N
            jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
            jLabel4.setName("jLabel4"); // NOI18N
     
            jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
            jLabel5.setName("jLabel5"); // NOI18N
     
            jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N
            jTextField1.setName("jTextField1"); // NOI18N
     
            jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
            jLabel6.setName("jLabel6"); // NOI18N
     
            jTextField2.setText(resourceMap.getString("jTextField2.text")); // NOI18N
            jTextField2.setName("jTextField2"); // NOI18N
     
            jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
            jLabel7.setName("jLabel7"); // NOI18N
     
            jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N
            jTextField3.setName("jTextField3"); // NOI18N
     
            jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
            jLabel8.setName("jLabel8"); // NOI18N
     
            jTextField4.setText(resourceMap.getString("jTextField4.text")); // NOI18N
            jTextField4.setName("jTextField4"); // NOI18N
     
            jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
            jLabel9.setName("jLabel9"); // NOI18N
     
            jTextField5.setText(resourceMap.getString("jTextField5.text")); // NOI18N
            jTextField5.setName("jTextField5"); // NOI18N
     
            jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
            jLabel10.setName("jLabel10"); // NOI18N
     
            jTextField6.setText(resourceMap.getString("jTextField6.text")); // NOI18N
            jTextField6.setName("jTextField6"); // NOI18N
     
            jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
            jLabel11.setName("jLabel11"); // NOI18N
     
            jTextField7.setText(resourceMap.getString("jTextField7.text")); // NOI18N
            jTextField7.setName("jTextField7"); // NOI18N
     
            jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
            jLabel12.setName("jLabel12"); // NOI18N
     
            jTextField8.setText(resourceMap.getString("jTextField8.text")); // NOI18N
            jTextField8.setName("jTextField8"); // NOI18N
     
            jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
            jLabel13.setName("jLabel13"); // NOI18N
     
            jTextField9.setText(resourceMap.getString("jTextField9.text")); // NOI18N
            jTextField9.setName("jTextField9"); // NOI18N
     
            jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
            jLabel14.setName("jLabel14"); // NOI18N
     
            jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Employe", "Ingineer", "Traider", "Marketer" }));
            jComboBox2.setName("jComboBox2"); // NOI18N
     
            jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
            jButton1.setName("jButton1"); // NOI18N
     
            jLabel15.setFont(resourceMap.getFont("jLabel15.font")); // NOI18N
            jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
            jLabel15.setName("jLabel15"); // NOI18N
     
            jScrollPane1.setName("jScrollPane1"); // NOI18N
     
            jList1.setModel(new javax.swing.AbstractListModel() {
                String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
                public int getSize() { return strings.length; }
                public Object getElementAt(int i) { return strings[i]; }
            });
            jList1.setName("jList1"); // NOI18N
            jScrollPane1.setViewportView(jList1);
     
            jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
            jButton2.setName("jButton2"); // NOI18N
     
            jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
            jButton3.setName("jButton3"); // NOI18N
     
            javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel5)
                                .addComponent(jLabel8)
                                .addComponent(jLabel11))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel2Layout.createSequentialGroup()
                                            .addComponent(jLabel6)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel7)
                                            .addGap(18, 18, 18)
                                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel2Layout.createSequentialGroup()
                                            .addComponent(jLabel9)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel2Layout.createSequentialGroup()
                                                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel10))
                                                .addGroup(jPanel2Layout.createSequentialGroup()
                                                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel13)))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jButton1)))))
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel12))))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jLabel14)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jLabel15)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(29, 29, 29)
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jButton2)
                                .addComponent(jButton3))))
                    .addGap(45, 45, 45))
            );
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel6)
                        .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel7)
                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    ....
     
    ....
    j'ai pas mis tout
    }
    Donc si je comprends bien , je dois copier tel quel dans la classe terminal de mon programme eclipse (si oui que dois je faire des autres petites classes crées automatiquement par netbeans dans les autres fichiers java).

  4. #4
    Expert confirmé
    Avatar de Valère
    Profil pro
    Inscrit en
    Août 2005
    Messages
    1 334
    Détails du profil
    Informations personnelles :
    Âge : 49
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Août 2005
    Messages : 1 334
    Points : 4 740
    Points
    4 740
    Par défaut
    Pardon, tu avait fait un projet "Desktop Application", et non un projet Swing standard. Dans ce cas, je suis désolé, je ne me suis pas penché sur le problème.

    Valère
    Pensez au bouton
    Je ne répond pas aux questions techniques par email ou MP.

Discussions similaires

  1. Insérer une JComboBox dans une JTable sous NetBeans ?
    Par khadi8 dans le forum Composants
    Réponses: 1
    Dernier message: 29/04/2012, 17h49
  2. Réponses: 0
    Dernier message: 04/05/2010, 17h58
  3. [Debutant] Mettre une chaine de caractere dans un tableau
    Par bouboussjunior dans le forum Collection et Stream
    Réponses: 4
    Dernier message: 14/09/2004, 11h33
  4. [Débutant] Lancer une interface sous éclipse
    Par bonnefr dans le forum SWT/JFace
    Réponses: 11
    Dernier message: 11/05/2004, 15h59

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