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 :

Erreur lors de l'utilisation de TableSorter.java


Sujet :

AWT/Swing Java

  1. #1
    Membre du Club Avatar de Frac10
    Profil pro
    Inscrit en
    Avril 2006
    Messages
    81
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Avril 2006
    Messages : 81
    Points : 43
    Points
    43
    Par défaut Erreur lors de l'utilisation de TableSorter.java
    Bonjour tout le monde !

    Alors voilà, j'utilise le TableSorter de Sun sur une JTable : cela marche convenablement lors de l'affichage initial du tableau mais lorsque je mets à jour ce tableau, j'ai une erreur sur le fichier TableSorter.java (et donc pas sur mon fichier perso) qui apparaît et la mise à jour du tableau se bloque. Par contre si je rafraîchi la fenêtre (en l'agrandissant par exemple), alors le tableau réapparait...

    Voilà cette erreur :
    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
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at TableSorter$Row.access$500(TableSorter.java:283)
            at TableSorter.modelIndex(TableSorter.java:237)
            at TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(Unknown Source)
            at javax.swing.JTable.prepareRenderer(Unknown Source)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
            at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
            at javax.swing.plaf.ComponentUI.update(Unknown Source)
            at javax.swing.JComponent.paintComponent(Unknown Source)
            at javax.swing.JComponent.paint(Unknown Source)
            at javax.swing.JComponent.paintChildren(Unknown Source)
            at javax.swing.JComponent.paint(Unknown Source)
            at javax.swing.JViewport.paint(Unknown Source)
            at javax.swing.JComponent.paintChildren(Unknown Source)
            at javax.swing.JComponent.paint(Unknown Source)
            at javax.swing.JComponent.paintChildren(Unknown Source)
            at javax.swing.JComponent.paint(Unknown Source)
            at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)
            at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
            at javax.swing.JComponent._paintImmediately(Unknown Source)
            at javax.swing.JComponent.paintImmediately(Unknown Source)
            at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
            at java.awt.event.InvocationEvent.dispatch(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    Je n'arrive pas à comprendre d'où cela provient, donc si d'autres personnes ont déjà eu le même problème que moi lors de l'utilisation de ce TableSorter, çà serait sympa de m'éclairer...

  2. #2
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    J'ai aussi divers souci avec mon TableSorter. Les erreurs apparaissent directement à la première création du tableau.

    J'ai essayé de debugger, mais c'est vraiment galère. Apparemment, certain paramètres ne passent pas et on se retrouve a utiliser des valeurs nulles.

    Voici une partie de mes erreurs :

    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
     
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
            at javax.swing.JTable.getValueAt(JTable.java:1903)
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -18
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -18
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -17
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
            at javax.swing.JComponent.paintComponent(JComponent.java:742)
            at javax.swing.JComponent.paint(JComponent.java:1005)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JViewport.paint(JViewport.java:728)
            at javax.swing.JComponent.paintChildren(JComponent.java:842)
            at javax.swing.JComponent.paint(JComponent.java:1014)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at utilisateursojv.TableSorter.getViewToModel(TableSorter.java:226)
            at utilisateursojv.TableSorter.modelIndex(TableSorter.java:237)
            at utilisateursojv.TableSorter.getValueAt(TableSorter.java:274)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  3. #3
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    Il y a plusieurs versions de ce TableSorter non ?

    Vous pouvez nous mettre un lien vers celui que vous utilisez qu'on y voit un peu plus clair ? (notamment pour les numéros de ligne)
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  4. #4
    Membre du Club Avatar de Frac10
    Profil pro
    Inscrit en
    Avril 2006
    Messages
    81
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Avril 2006
    Messages : 81
    Points : 43
    Points
    43
    Par défaut
    Tout d'abord merci pour vos réponses.

    Pour Satch, voici un lien vers le fichier que j'utilise :

    TableSorter.java

    Voilà, çà à l'air de venir de cette ligne :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    return getViewToModel()[viewIndex].modelIndex;
    Mais je ne comprends toujours pas pourquoi...

  5. #5
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    Bizarre.
    Je vais peut-être dire n'importe quoi, parce que je ne suis jamais tombé sur une stacktrace comme ça.

    Essaye (à tout hasard) de remplacer
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
        public int modelIndex(int viewIndex) {
            return getViewToModel()[viewIndex].modelIndex;
        }
    par
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
        public int modelIndex(int viewIndex) {
        	Row r = getViewToModel()[viewIndex];
        	if (r==null){
        		System.err.println("Evidemment que ça merde...");
        	}
            return r.modelIndex;
        }
    Si ça ne marque pas que ça merde, essaye (toujours à tout hasard mais j'y crois pas du tout) de remplacer le private modelIndex de la class Row par un protected.
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  6. #6
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    J'ai la même version que Frac10, et j'ai la même erreur.

    J'ai essayé avec ton code, apparemment r n'est pas null, mais malgré ça il y a une erreur. J'ai exécuté mon code une bonne vingtaine de fois en pas à pas mais je n'y comprend rien.
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  7. #7
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    C'est ça qui m'a l'air bizarre et que je ne comprends pas.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    at TableSorter$Row.access$500(TableSorter.java:283)
    Est-ce que l'un de vous deux pourrait poster ici un code complet (le plus simple possible) permettant d'obtenir cette erreur ? Qu'on puisse regarder comme il faut
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  8. #8
    Membre confirmé Avatar de broumbroum
    Profil pro
    Inscrit en
    Août 2006
    Messages
    406
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Suisse

    Informations forums :
    Inscription : Août 2006
    Messages : 406
    Points : 465
    Points
    465
    Par défaut
    AWT-EVENTQUEUE ne renvoie que des erreurs de Threads AWT donc c'est surement une erreur de synchronisation de méthode. lorsque tu modifies le tableau veille à la synchronisation de celle-ci:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    // mot-clé synchronized sur le tableau
    modifierCellule(int i0, int i1) {
    synchronized(tonTableau) { tonTableau.setCell(i0,i1, "valeur modifiée"); }
    }
    C'est la synchronisation en général pour le EDT (Event Dispatcher Thread si je ne m'abuse pas trop)

  9. #9
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    @Satch : mon code est bcp trop long, et il récupère les informations d'un autre programme, donc je doute que ça soit possible.

    @broumbroum : je ne connais pas les synchronisations. Je dois la placer ou ? Dans la classe TableSorter ? Ou quand je l'ajoute a mon model ?
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  10. #10
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    Citation Envoyé par Bloodscalp
    @Satch : mon code est bcp trop long, et il récupère les informations d'un autre programme, donc je doute que ça soit possible.
    C'est pour ça que je demande un "petit" code qui permet de reproduire le truc.
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  11. #11
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    Je te met la méthode qui apelle la classe TableSorter, c'est dans les dernières lignes.

    J'utilise une autre application qui me retourne environ 2000 entrées que je rajoute à mon tableau, essaye de magouiller qqch pour mettre des valeurs fictives à la place.

    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
        private void Rechercher(java.awt.event.ActionEvent evt) {                            
            // Réinitialise la grille des résultats
            Reinitialiser();
     
            // Si on désire rechercher des utilisateurs
            if(rbtUtilisateurs.isSelected()){
     
                // Dans les textbox de choix de la date limite, remplace les cases vides par des 0
                if(txtNbreJours.getText().equals("")){
                    txtNbreJours.setText("0");
                }
                if(txtNbreMois.getText().equals("")){
                    txtNbreMois.setText("0");
                }
                if(txtNbreAnnees.getText().equals("")){
                    txtNbreAnnees.setText("0");
                }
     
                // Soustrait au calendrier limite le nombre de jours/mois/années choisis
                calCalendrierLimite.add(Calendar.DAY_OF_MONTH,-Integer.parseInt(txtNbreJours.getText()));
                calCalendrierLimite.add(Calendar.MONTH,-Integer.parseInt(txtNbreMois.getText()));
                calCalendrierLimite.add(Calendar.YEAR,-Integer.parseInt(txtNbreAnnees.getText()));
     
                // Spécifie l'utilisateur à rechercher. Si le champ de recherche est vide, il vas
                // rechercher tous les utilisateurs
                strUserNameRestriction = "*"+txtRestrictionRecherche.getText()+"*";
     
                // Créer un nouveau threas ou s'éxecuteras la recherche
                Thread RechercherUtilisateurs = new Thread() {
                    @Override public void run() {
     
                        // On effectue une recherche d'utilisateurs via les lignes de commandes d'EA
                        try{
                            proDonneesUtilisateur = Runtime.getRuntime().exec("EA USER "+strUserNameRestriction+" DISPLAY lastlogon fullname comment");
                        }
                        // Si une exception est renvoyée, on l'affiche dans la console
                        catch(IOException s){
                            System.out.println(s);
                        }
     
                        // Si on a un résultat
                        if (proDonneesUtilisateur != null){
                            // On créé un nouveau buffer qui contient les données
                            brdDonneesUtilisateur = new BufferedReader(new InputStreamReader(proDonneesUtilisateur.getInputStream()));
     
                            try{
                                // Initialise des variables utilisées pour les boucles
                                i = 0;
     
                                // Tant qu'on a pas lu toutes les données
                                while((strDonneesUtilisateur = brdDonneesUtilisateur.readLine()) != null){
                                    // Avec cette condition on ne lit pas les 2 premières lignes
                                    if(k > 2){
                                        try{
                                            // On extrait les différentes informations pour l'utilisateur
                                            strUserName = strDonneesUtilisateur.substring(0, strDonneesUtilisateur.indexOf(" "));
                                            strComment = strDonneesUtilisateur.substring(strDonneesUtilisateur.indexOf("comment:\"")+9, strDonneesUtilisateur.indexOf("\"",strDonneesUtilisateur.indexOf("comment:\"")+9));
                                            strFullname = strDonneesUtilisateur.substring(strDonneesUtilisateur.indexOf("fullname:\"")+10, strDonneesUtilisateur.indexOf("\"",strDonneesUtilisateur.indexOf("fullname:\"")+10));
     
                                            // Si l'utilisateur c'est déjà connecté une fois
                                            if(strDonneesUtilisateur.substring(strDonneesUtilisateur.indexOf("lastlogon:")+10, strDonneesUtilisateur.indexOf("lastlogon:")+15).compareTo("never") != 0){
                                                // On extrait la date de son dernier logon
                                                strLastLogon = strDonneesUtilisateur.substring(strDonneesUtilisateur.indexOf("lastlogon:")+10, strDonneesUtilisateur.indexOf("lastlogon:")+20);
                                                strJour = strLastLogon.substring(8,10);
                                                strMois = strLastLogon.substring(5,7);
                                                strAnnee = strLastLogon.substring(0,4);
                                                intJour = Integer.parseInt(strJour);
                                                intMois = Integer.parseInt(strMois);
                                                intAnnee = Integer.parseInt(strAnnee);
                                                // Reformate la date pour l'affichage
                                                strLastLogon = ""+strAnnee+SYMBOLE_ENTRE_DATE+strMois+SYMBOLE_ENTRE_DATE+strJour;
     
                                                // On créer une nouvelle date Calendar pour le dernier logon
                                                calCalendrierLastLogon.set(Calendar.YEAR,intAnnee);
                                                calCalendrierLastLogon.set(Calendar.MONTH,intMois);
                                                calCalendrierLastLogon.set(Calendar.DAY_OF_MONTH,intJour);
     
                                                // Si la date de dernier logon se trouve avant la date limite spécifiée
                                                if(calCalendrierLastLogon.before(calCalendrierLimite) || calCalendrierLastLogon.equals(calCalendrierLimite)){
                                                    // On ajoute l'utilisateur et ses informations au tableau
                                                    dtmModel.addRow(new String[] {strUserName, strFullname, strComment, strLastLogon});
                                                    // On incrémente la variable comptabilisant le nombre total d'affichages
                                                    intNbreAffiches++;
                                                    lblResultats.setText("Recherche en cours : "+intNbreAffiches+" utilisateurs trouvés");
                                                }
                                            }
                                            // Si l'utilisateur ne c'est jamais connecté
                                            else{
                                                // Si l'utilisateur a choisi d'afficher les utilisateurs ne s'étant jamais connectés
                                                if(ckbUserNeverLoggedon.isSelected()){
                                                    // On définit la date de son dernier logon a "Jamais"
                                                    strLastLogon = "Jamais";
                                                    // On ajoute l'utilisateur et ses informations au tableau
                                                    dtmModel.addRow(new String[] {strUserName, strComment, strFullname, strLastLogon});
                                                    // On incrémente la variable comptabilisant le nombre total d'affichages
                                                    intNbreAffiches++;
                                                    lblResultats.setText("Recherche en cours : "+intNbreAffiches+" utilisateurs trouvés");
                                                }
                                            }
                                        }
                                        // Si une exception est renvoyée, on l'affiche dans la console
                                        catch(IndexOutOfBoundsException e){
                                            System.out.println(e);
                                        }
                                        i++;
                                    } else {
                                        k++;
                                    }
                                }
                            }
                            // Si une exception est renvoyée, on l'affiche dans la console
                            catch(IOException io){
                                System.out.println(io);
                            }
                        }
                        // On détruit le process
                        proDonneesUtilisateur.destroy();
                        lblResultats.setText("Recherche terminée : "+intNbreAffiches+" utilisateurs trouvés");
                    }
                };
                // On lance le thread
                RechercherUtilisateurs.start();
                strEmplacementRecherche = "utilisateurs";
            }
            // Si on désire rechercher des dossiers
            else if(rbtDossiers.isSelected()){
                // Initialise des variales nécessaires
                arlNomUtilisateurs = new ArrayList();
                strDossiersUtilisateurs = fleRepertoireDossiers.list();
     
                // Si le dossier spécifié n'existe pas ou n'est pas un dossier
                if (strDossiersUtilisateurs == null) {
                    // L'afficher dans la console
                    System.out.println("Le dossier spécifié n'existe pas ou n'est pas un dossier");
                }
                // Si le dossier existe
                else {
                    Thread RechercherDossiers = new Thread() {
                        @Override public void run() {
                            // On vas chercher le nom de tous les utilisateurs
                            try{
                                proDonneesUtilisateur = Runtime.getRuntime().exec("EA USER * DISPLAY name");
                            }
                            catch(IOException s){
                                System.out.println(s);
                            }
     
                            // Si on a un résultat
                            if (proDonneesUtilisateur != null){
                                // On met les données dans un nouveau buffer
                                brdDonneesUtilisateur = new BufferedReader(new InputStreamReader(proDonneesUtilisateur.getInputStream()));
     
                                int k = 0;
                                try{
                                    // Pour chaque nom d'utilisateur
                                    while((strDonneesUtilisateur = brdDonneesUtilisateur.readLine()) != null){
                                        // On l'ajoute à la liste
                                        arlNomUtilisateurs.add(k,strDonneesUtilisateur);
                                        k++;
                                    }
                                }
                                catch(IOException io){
                                    System.out.println(io);
                                }
                            }
     
                            // Pour chaque dossier
                            for (i=0; i<strDossiersUtilisateurs.length; i++){
                                // On par du principe que l'utilisateur n'existe pas
                                blnUtilisateurExistant = false;
     
                                // On créer un nouvel objet file avec le chemin du dossier
                                fleDossierUtilisateur = new File(fleRepertoireDossiers+"/"+strDossiersUtilisateurs[i]);
     
                                // Si le fichier est un répértoire
                                if(fleDossierUtilisateur.isDirectory()){
                                    // Pour chaque nom d'utilisateur
                                    for(int l=0; l<arlNomUtilisateurs.size(); l++){
                                        // Le comparer avec le nom du dossier. Si les deux noms correspondent.
                                        if(strDossiersUtilisateurs[i].equals(arlNomUtilisateurs.get(l))){
                                            // On spécifie qu'on a trouvé l'utilisateur
                                            blnUtilisateurExistant = true;
                                            break;
                                        }
                                    }
     
                                    // Si l'utilisateur n'éxiste pas
                                    if(!blnUtilisateurExistant){
                                        // On récupère la date de la dernière modification dans un calendrier
                                        calDerniereModifDossier.setTimeInMillis(fleDossierUtilisateur.lastModified());
                                        intJour = calDerniereModifDossier.get(Calendar.DAY_OF_MONTH);
                                        intMois = calDerniereModifDossier.get(Calendar.MONTH)+1;
                                        intAnnee = calDerniereModifDossier.get(Calendar.YEAR);
                                        // Formatte la date au format JJ.MM.AAAA
                                        if(intJour < 10){
                                            strJour = "0"+intJour;
                                        }
                                        else{
                                            strJour = ""+intJour;
                                        }
     
                                        if(intMois < 10){
                                            strMois = "0"+intMois;
                                        }
                                        else{
                                            strMois = ""+intMois;
                                        }
                                        strAnnee = ""+intAnnee;
     
                                        // On ajoute le dossier et ses informations
                                        dtmModel.addRow(new String[] {strDossiersUtilisateurs[i], strAnnee+SYMBOLE_ENTRE_DATE+strMois+SYMBOLE_ENTRE_DATE+strJour});
                                        intNbreAffiches++;
                                        lblResultats.setText("Recherche en cours : "+intNbreAffiches+" dossiers trouvés");
                                    }
                                }
                                SwingUtilities.invokeLater(new Runnable() {
    			            public void run() {
                                            pgbRechercher.setValue(i*100/strDossiersUtilisateurs.length);
                                        }
                                });
                            }
                            proDonneesUtilisateur.destroy();
                            lblResultats.setText("Recherche terminée : "+intNbreAffiches+" dossiers trouvés");
                        }
                    };
                    RechercherDossiers.start();
                    strEmplacementRecherche = "dossiers";
                }
            }
            // On affiche les résultats dans la grille
            TableSorter tbsSorter = new TableSorter(dtmModel);
            tabResultats.setModel(tbsSorter);
            tbsSorter.setTableHeader(tabResultats.getTableHeader());
            //tabResultats.setModel(dtmModel);
        }
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  12. #12
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    Citation Envoyé par Bloodscalp
    Je te met la méthode qui apelle la classe TableSorter, c'est dans les dernières lignes.
    Ca permet pas de recréer le pb ça, y a trop d'erreur de compil.

    C'est pas à moi de bidouiller ça
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  13. #13
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    Citation Envoyé par Bloodscalp
    @broumbroum : je ne connais pas les synchronisations. Je dois la placer ou ? Dans la classe TableSorter ? Ou quand je l'ajoute a mon model ?
    Synchronize sur le tableau chaque fois que tu fais une opération qui vas le modifier.
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  14. #14
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    Voila, créé un nouveau projet avec ca :

    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
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    /*
     * frmRechercher.java
     *
     * Created on 23. octobre 2006, 11:34
     */
     
    package test;
     
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
     
    import java.io.File;
    import java.io.IOException;
     
    import java.lang.Object.*;
    import java.lang.String;
    import java.lang.Runtime;
     
    import javax.swing.*;
    import javax.swing.plaf.basic.BasicLookAndFeel;
    import javax.swing.plaf.metal.MetalLookAndFeel;
    import javax.swing.table.*;
     
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
     
    import java.util.Calendar;
    import java.util.ArrayList;
     
    import java.text.SimpleDateFormat;
     
    import com.sun.java.swing.plaf.motif.MotifLookAndFeel;
    import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
     
    import test.TableSorter;
     
    /**
     *
     * @author  xojmrc
     */
    public class Main extends javax.swing.JFrame {
     
        // Décalration et initialisation des variables
        private DefaultTableModel dtmModel = null;
        private Process proDonneesUtilisateur = null;
        private BufferedReader brdDonneesUtilisateur = null;
     
        private String strDonneesUtilisateur = null;
        private String strUserName = null;
        private String strLastLogon = null;
        private String strComment = null;
        private String strFullname = null;
        private String strTemp = null;
        private String strUserNameRestriction = null;
        private String strTexteAvertissement = null;
        private static String SYMBOLE_ENTRE_DATE = ".";
     
        private String strJour = null;
        private String strMois = null;
        private String strAnnee = null;
        private String strEmplacementRecherche = null;
     
        private String[] strDossiersUtilisateurs = null;
        private int[] intLignesSelectionnees = null;
        private String[][] strDonnesUtilisateursSelectionnes = null;
     
        private Calendar calCalendrierLimite = Calendar.getInstance();
        private Calendar calCalendrierLastLogon = Calendar.getInstance();
        private Calendar calDerniereModifDossier = Calendar.getInstance();
     
        private int intJour = 0;
        private int intMois = 0;
        private int intAnnee = 0;
        private int intNbreAffiches = 0;
        private int i = 0;
        private int k = 0;
        private int intNbreLignesSelectionnees = 0;
     
        private File fleRepertoireDossiers = new File("C:/users");
        //private File fleRepertoireDossiers = new File("//nac2recojv/qt_ojvusers$/USERS");
        private File fleDossierUtilisateur = null;
     
        private boolean blnUtilisateurExistant = false;
     
        private ArrayList arlNomUtilisateurs = null;
     
        /** Creates new form frmRechercher */
        public Main() {
            //Change l'aspect visuel de la fenêtre à celui de l'OS
            try {
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            }//try
            catch (Exception e) {
                    JOptionPane.showMessageDialog(null,e);
            }//catch
            initComponents();
        }
     
        /* *********************************************************************
         * Méthode :        initComponents()
         * Auteur :		Form Editor de NetBeans
         * Remarque :       /!\ Faire attention aux modifications qu'on y apporte
         *                  Il utilise le layer Matisse de NetBeans 5.0
                            pour créer le GUI
         * But :		Initialise les composants de la form frmRechercher
         * Paramètres :	-
         * Retour :		-
         * *********************************************************************/
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                          
        private void initComponents() {
            btgRecherche = new javax.swing.ButtonGroup();
            btgApparence = new javax.swing.ButtonGroup();
            btnSupprimer = new javax.swing.JButton();
            jspConteneurTab = new javax.swing.JScrollPane();
            tabResultats = new javax.swing.JTable();
            btnRechercher = new javax.swing.JButton();
            pgbRechercher = new javax.swing.JProgressBar();
            rbtDossiers = new javax.swing.JRadioButton();
            rbtUtilisateurs = new javax.swing.JRadioButton();
            txtNbreJours = new javax.swing.JTextField();
            lblJours = new javax.swing.JLabel();
            lblResultats = new javax.swing.JLabel();
            txtNbreMois = new javax.swing.JTextField();
            lblMois = new javax.swing.JLabel();
            txtNbreAnnees = new javax.swing.JTextField();
            lblAnnees = new javax.swing.JLabel();
            ckbUserNeverLoggedon = new javax.swing.JCheckBox();
            lblUserName = new javax.swing.JLabel();
            txtRestrictionRecherche = new javax.swing.JTextField();
            btnHelp = new javax.swing.JButton();
            jMenuBar1 = new javax.swing.JMenuBar();
            mnuOutils = new javax.swing.JMenu();
            mniConfiguration = new javax.swing.JMenuItem();
            mnuDonnees = new javax.swing.JMenu();
            mniReinitialiser = new javax.swing.JMenuItem();
            mniEffacerListe = new javax.swing.JMenuItem();
            mnuAffichage = new javax.swing.JMenu();
            mnuApparence = new javax.swing.JMenu();
            mniWindows = new javax.swing.JRadioButtonMenuItem();
            mniMetal = new javax.swing.JRadioButtonMenuItem();
            mniMotif = new javax.swing.JRadioButtonMenuItem();
     
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Recherche");
            btnSupprimer.setText("Supprimer...");
            btnSupprimer.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    AfficherSupprimer(evt);
                }
            });
     
            tabResultats.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {
                    {null, null, null, null},
                    {null, null, null, null},
                    {null, null, null, null},
                    {null, null, null, null}
                },
                new String [] {
                    "Title 1", "Title 2", "Title 3", "Title 4"
                }
            ));
            jspConteneurTab.setViewportView(tabResultats);
     
            btnRechercher.setText("Rechercher");
            btnRechercher.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    Rechercher(evt);
                }
            });
     
            btgRecherche.add(rbtDossiers);
            rbtDossiers.setText("Rechercher des dossiers dont l'utilisateur n'existe plus");
            rbtDossiers.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            rbtDossiers.setMargin(new java.awt.Insets(0, 0, 0, 0));
            rbtDossiers.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    VerouillerConfigRechercheUtilisateurs(evt);
                }
            });
     
            btgRecherche.add(rbtUtilisateurs);
            rbtUtilisateurs.setSelected(true);
            rbtUtilisateurs.setText("Rechercher les utilisateur qui ne se sont plus connect\u00e9s depuis plus de");
            rbtUtilisateurs.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            rbtUtilisateurs.setMargin(new java.awt.Insets(0, 0, 0, 0));
            rbtUtilisateurs.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    DeverouillerConfigRechercheUtilisateurs(evt);
                }
            });
     
            txtNbreJours.setText("0");
     
            lblJours.setText("jours,");
     
            lblResultats.setText("Resultats :");
     
            txtNbreMois.setText("0");
     
            lblMois.setText("mois et");
     
            txtNbreAnnees.setText("0");
     
            lblAnnees.setText("ann\u00e9es.");
     
            ckbUserNeverLoggedon.setText("Afficher les utilisateurs qui ne se sont jamais connect\u00e9s");
            ckbUserNeverLoggedon.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            ckbUserNeverLoggedon.setMargin(new java.awt.Insets(0, 0, 0, 0));
     
            lblUserName.setText("Restriction de recherche :");
     
            btnHelp.setText("?");
            btnHelp.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    OuvrirFenetreAideRecherche(evt);
                }
            });
     
            mnuOutils.setText("Outils");
            mniConfiguration.setText("Configuration");
            mnuOutils.add(mniConfiguration);
     
            jMenuBar1.add(mnuOutils);
     
            mnuDonnees.setText("Donn\u00e9es");
            mniReinitialiser.setText("R\u00e9initialiser tout");
            mniReinitialiser.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ReinitialiserTout(evt);
                }
            });
     
            mnuDonnees.add(mniReinitialiser);
     
            mniEffacerListe.setText("Effacer la liste");
            mniEffacerListe.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    EffacerListe(evt);
                }
            });
     
            mnuDonnees.add(mniEffacerListe);
     
            jMenuBar1.add(mnuDonnees);
     
            mnuAffichage.setText("Affichage");
            mnuApparence.setText("Apparence");
            btgApparence.add(mniWindows);
            mniWindows.setSelected(true);
            mniWindows.setText("Windows");
            mniWindows.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    setLookAndFeelWindows(evt);
                }
            });
     
            mnuApparence.add(mniWindows);
     
            btgApparence.add(mniMetal);
            mniMetal.setText("Metal");
            mniMetal.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    setLookAndFeeMetal(evt);
                }
            });
     
            mnuApparence.add(mniMetal);
     
            btgApparence.add(mniMotif);
            mniMotif.setText("Motif");
            mniMotif.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    setLookAndFeeMotif(evt);
                }
            });
     
            mnuApparence.add(mniMotif);
     
            mnuAffichage.add(mnuApparence);
     
            jMenuBar1.add(mnuAffichage);
     
            setJMenuBar(jMenuBar1);
     
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jspConteneurTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 689, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, btnSupprimer)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(17, 17, 17)
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(layout.createSequentialGroup()
                                    .add(lblUserName)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(txtRestrictionRecherche, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 173, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(btnHelp))
                                .add(ckbUserNeverLoggedon))
                            .add(44, 44, 44))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(rbtUtilisateurs)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(txtNbreJours, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(lblJours)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(txtNbreMois, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(lblMois)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(txtNbreAnnees, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(lblAnnees))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, lblResultats)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(btnRechercher, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 99, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(pgbRechercher, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 584, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, rbtDossiers))
                    .addContainerGap())
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(rbtUtilisateurs)
                        .add(lblJours)
                        .add(txtNbreMois, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(lblMois)
                        .add(txtNbreAnnees, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(txtNbreJours, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(lblAnnees))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(ckbUserNeverLoggedon)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(lblUserName)
                        .add(txtRestrictionRecherche, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(btnHelp))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(rbtDossiers)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(btnRechercher)
                        .add(pgbRechercher, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(lblResultats)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jspConteneurTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(btnSupprimer)
                    .addContainerGap())
            );
            pack();
        }// </editor-fold>                        
     
        private void ReinitialiserTout(java.awt.event.ActionEvent evt) {                                   
            Reinitialiser();
            rbtUtilisateurs.setSelected(true);
            txtNbreJours.setText("0");
            txtNbreMois.setText("0");
            txtNbreAnnees.setText("0");
            txtRestrictionRecherche.setText("");
            ckbUserNeverLoggedon.setSelected(false);
            VerouillerConfig(false);
            pgbRechercher.setValue(0);
        }                                  
     
        private void setLookAndFeeMotif(java.awt.event.ActionEvent evt) {                                    
            DefinirLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
        }                                   
     
        private void setLookAndFeeMetal(java.awt.event.ActionEvent evt) {                                    
            DefinirLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
        }                                   
     
        private void setLookAndFeelWindows(java.awt.event.ActionEvent evt) {                                       
            DefinirLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        }                                      
     
        private void DefinirLookAndFeel(String strApparence){
            try {
                UIManager.setLookAndFeel(strApparence);
                SwingUtilities.updateComponentTreeUI(this);
            }
            catch(Exception e) {
                e.printStackTrace();
            }
        }
     
        private void EffacerListe(java.awt.event.ActionEvent evt) {                              
            Reinitialiser();
        }                             
     
        private void DeverouillerConfigRechercheUtilisateurs(java.awt.event.ActionEvent evt) {                                                         
            VerouillerConfig(false);
        }                                                        
     
        private void VerouillerConfigRechercheUtilisateurs(java.awt.event.ActionEvent evt) {                                                       
            VerouillerConfig(true);
        }                                                      
     
        private void OuvrirFenetreAideRecherche(java.awt.event.ActionEvent evt) { 
     
        }                                           
     
            /*
            dtmModel = new DefaultTableModel(
                    new Object [][] {},
                    new String [] {
                        "Nom d'utilisateur", "Nom complet", "Commentaire", "Dernier logon"
                    }
            );
            tabResultats.setModel(dtmModel);
            */
        /* *********************************************************************
         * Méthode :        Rechercher(java.awt.event.ActionEvent evt)
         * Auteur :		Christian Muller
         * But :		Effectue une recherche sur les utilisateurs
         *                  ou les dossiers, selon le bouton radio séléctionné
         * Paramètres :	evt
         *                      L'action qui a déclenché l'événement
         * Retour :		-
         * *********************************************************************/
        private void Rechercher(java.awt.event.ActionEvent evt) {                            
            // Réinitialise la grille des résultats
            Reinitialiser();
     
            // Si on désire rechercher des utilisateurs
            if(rbtUtilisateurs.isSelected()){
     
     
                // Créer un nouveau threas ou s'éxecuteras la recherche
                Thread RechercherUtilisateurs = new Thread() {
                    @Override public void run() {
                        for(int i = 0; i<2000; i++){
                            dtmModel.addRow(new String[] {i+"", "texte", "texte", "texte"});
                        }
                    }
                };
                // On lance le thread
                RechercherUtilisateurs.start();
                strEmplacementRecherche = "utilisateurs";
            }
            // Si on désire rechercher des dossiers
            else if(rbtDossiers.isSelected()){
     
            }
            // On affiche les résultats dans la grille
            TableSorter tbsSorter = new TableSorter(dtmModel);
            tabResultats.setModel(tbsSorter);
            tbsSorter.setTableHeader(tabResultats.getTableHeader());
            //tabResultats.setModel(dtmModel);
        }                           
     
        /* *********************************************************************
         * Méthode :        AfficherSupprimer(java.awt.event.ActionEvent evt)
         * Auteur :		Christian Muller
         * But :		Affiche la form de supression
         * Paramètres :	evt
         *                      L'action qui a déclenché l'événement
         * Retour :		-
         * *********************************************************************/
        private void AfficherSupprimer(java.awt.event.ActionEvent evt) {                                   
            if(strEmplacementRecherche == "utilisateurs"){
                intLignesSelectionnees = tabResultats.getSelectedRows();
                strDonnesUtilisateursSelectionnes = new String[6][intLignesSelectionnees.length];
                for(i=0; i<intLignesSelectionnees.length; i++){
                    strDonnesUtilisateursSelectionnes[0][i] = i+"";
                    strDonnesUtilisateursSelectionnes[1][i] = tabResultats.getValueAt(intLignesSelectionnees[i], 0).toString();
                    strDonnesUtilisateursSelectionnes[2][i] = tabResultats.getValueAt(intLignesSelectionnees[i], 1).toString();
                    strDonnesUtilisateursSelectionnes[3][i] = tabResultats.getValueAt(intLignesSelectionnees[i], 2).toString();
                    strDonnesUtilisateursSelectionnes[4][i] = tabResultats.getValueAt(intLignesSelectionnees[i], 3).toString();
                    strDonnesUtilisateursSelectionnes[5][i] = fleRepertoireDossiers+"\\"+tabResultats.getValueAt(intLignesSelectionnees[i], 0);
                }
     
                // Créer une nouvelle instance du form de suppression
     
            }
            else if(strEmplacementRecherche == "dossiers"){
                intLignesSelectionnees = tabResultats.getSelectedRows();
                intNbreLignesSelectionnees = intLignesSelectionnees.length;
                if(intNbreLignesSelectionnees < 2){
                    strTexteAvertissement = "Voulez-vous vraiment supprimer ce dossier ?";
                }
                else{
                    strTexteAvertissement = "Voulez-vous vraiment supprimer ces "+intNbreLignesSelectionnees+" dossiers ?";
                }
                if(JOptionPane.showConfirmDialog(null, strTexteAvertissement, "Attention", JOptionPane.YES_NO_OPTION) == JOptionPane.OK_OPTION){
                    for(i=intNbreLignesSelectionnees-1; i>=0; i--){
                        fleDossierUtilisateur = new File(fleRepertoireDossiers+"/"+tabResultats.getValueAt(intLignesSelectionnees[i], 0).toString());
                        if(fleDossierUtilisateur.exists()){
                            if(fleDossierUtilisateur.delete()){
                                dtmModel.removeRow(intLignesSelectionnees[i]);
                                intLignesSelectionnees = tabResultats.getSelectedRows();
                                intNbreAffiches--;
                            }
                            else{
                                System.out.println("Erreur lors de l'effacement");
                            }
                        }
                        else{
                            System.out.println("Le dossier n'a pas été trouvé");
                        }
                    }
                    lblResultats.setText("Recherche terminée : "+intNbreAffiches+" dossiers trouvés");
                }
            }
        }                                  
     
        /* *********************************************************************
         * Méthode :        Reinitialiser()
         * Auteur :		Christian Muller
         * But :		Supprime les entrées de la liste et refait les
         *                  en-têtes en fonction de la séléctione de radio bouton
         * Paramètres :	-
         * Retour :		-
         * *********************************************************************/
        private void Reinitialiser(){
            // Initialise le calendrier de la date limite à la date actuelle
            calCalendrierLimite = Calendar.getInstance();
     
            intNbreAffiches = 0;
            pgbRechercher.setValue(0);
     
            // Recréé le tableau et l'en-tête en fonction de la séléction
            if(rbtUtilisateurs.isSelected()){
                dtmModel = new DefaultTableModel(
                    new Object [][] {
     
                    },
                    new String [] {
                        "Nom d'utilisateur", "Nom complet", "Commentaire", "Dernier logon"
                    }
                );
            }
            else if(rbtDossiers.isSelected()){
                dtmModel = new DefaultTableModel(
                    new Object [][] {
     
                    },
                    new String [] {
                        "Nom du dossier", "Dernière modification"
                    }
                );
            }
            tabResultats.setModel(dtmModel);
            lblResultats.setText("Résultats :");
        }
     
     
        /**
         * @param args the command line arguments
         */
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
                }
            });
        }
     
        /* *********************************************************************
         * Méthode :        VerouillerConfig(boolean blnVerouiller)
         * Auteur :		Christian Muller
         * But :		Vérouille ou dévérouille les textbox/boutons en
         *                  en fonction de la séléction de radiobouton.
         * Paramètres :	evt
         *                      L'action qui a déclenché l'événement
         * Retour :		-
         * *********************************************************************/
        private void VerouillerConfig(boolean blnVerouiller){ 
            blnVerouiller = !blnVerouiller;
            txtNbreJours.setEnabled(blnVerouiller);
            txtNbreMois.setEnabled(blnVerouiller);
            txtNbreAnnees.setEnabled(blnVerouiller);
            txtRestrictionRecherche.setEnabled(blnVerouiller);
            ckbUserNeverLoggedon.setEnabled(blnVerouiller);
            btnHelp.setEnabled(blnVerouiller);
        }
     
        // Variables declaration - do not modify                     
        private javax.swing.ButtonGroup btgApparence;
        private javax.swing.ButtonGroup btgRecherche;
        private javax.swing.JButton btnHelp;
        private javax.swing.JButton btnRechercher;
        private javax.swing.JButton btnSupprimer;
        private javax.swing.JCheckBox ckbUserNeverLoggedon;
        private javax.swing.JMenuBar jMenuBar1;
        private javax.swing.JScrollPane jspConteneurTab;
        private javax.swing.JLabel lblAnnees;
        private javax.swing.JLabel lblJours;
        private javax.swing.JLabel lblMois;
        private javax.swing.JLabel lblResultats;
        private javax.swing.JLabel lblUserName;
        private javax.swing.JMenuItem mniConfiguration;
        private javax.swing.JMenuItem mniEffacerListe;
        private javax.swing.JRadioButtonMenuItem mniMetal;
        private javax.swing.JRadioButtonMenuItem mniMotif;
        private javax.swing.JMenuItem mniReinitialiser;
        private javax.swing.JRadioButtonMenuItem mniWindows;
        private javax.swing.JMenu mnuAffichage;
        private javax.swing.JMenu mnuApparence;
        private javax.swing.JMenu mnuDonnees;
        private javax.swing.JMenu mnuOutils;
        private javax.swing.JProgressBar pgbRechercher;
        private javax.swing.JRadioButton rbtDossiers;
        private javax.swing.JRadioButton rbtUtilisateurs;
        private javax.swing.JTable tabResultats;
        private javax.swing.JTextField txtNbreAnnees;
        private javax.swing.JTextField txtNbreJours;
        private javax.swing.JTextField txtNbreMois;
        private javax.swing.JTextField txtRestrictionRecherche;
        // End of variables declaration                   
     
    }
    ainsi que le table sorter. Ca me fait les mêmes erreurs.

    Clique simplement sur le bouton Rechercher dans le gui (sans rien toucher d'autre) et ca te fait les erreurs.

    EDIT : tu auras aussi besoin de la bibliothèque matisse de netbeans et de jdic. Je les ai mis ici
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  15. #15
    Membre confirmé Avatar de Satch
    Homme Profil pro
    Hypnothérapeute - Magicien
    Inscrit en
    Mars 2004
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Suisse

    Informations professionnelles :
    Activité : Hypnothérapeute - Magicien

    Informations forums :
    Inscription : Mars 2004
    Messages : 498
    Points : 645
    Points
    645
    Par défaut
    Bien bien, alors j'ai essayé avec Eclipse 3.2, et les librairies que tu as gracieusement fournies, en compilant avec 5.0 et.... je n'ai pas d'erreur.

    Donc là je ne vois pas du tout. Reste à essayer à tout hasard cette histoire de synchronized...

    (ou passer sur Eclipse ? Allez, un peu de propagande ne fait pas de mal )
    Je sais que désormais vivre est un calembour,
    La mort est devenue un état permanent,
    Le monde est aux fantômes, aux hyènes et aux vautours.
    Moi je vous dis bravo et vive la mort.

  16. #16
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    J'ai fait mon dernier projet sous eclipse. J'ai pris NetBeans cette fois pour tester Matisse, mais Eclipse me semble effectivement meilleur, en tout cas, on a plus le contrôle sur ce qu'on fait.

    Je vais essayer de tenter de le mettre sous Eclipse, on verra ce que ca donne.
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  17. #17
    Membre averti

    Profil pro
    Coach Agile
    Inscrit en
    Décembre 2005
    Messages
    316
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Coach Agile

    Informations forums :
    Inscription : Décembre 2005
    Messages : 316
    Points : 371
    Points
    371
    Par défaut
    Salut vous deux,

    Je ne veux pas lever de polémique, mais je ne pense pas que tu puisse régler ton problème en changeant d'EDI.
    D'ailleurs, pour apuyer mes dires, je viens delancer ton appli (code + libs fournis) sous NetBeans 5.5, et je n'ai pas le moindre problème. Ton bouton "Rechercher" fonctionne à merveille (si le résultat attendu est bien le remplissage du tableau).
    Bref, je n'ai pas mis le nez dans le code car je ne manipule pas ce genre d'objets, je ne te serai donc d'aucune aide. Cependant, je pencherai plus sur un problème d'environnement.
    Il me semble inutile de jeter NetBeans si vite (mais là, je ne suis peut être pas objectif ).

    Bon courage,
    Chris.

  18. #18
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    Le tableau se rempli, effectivement, mais il en ressort quand même une foule d'exceptions, chose que j'aimerais éviter.

    Mon point de vue sur NetBeans est personnel, et ne fait nullement suite à ces erreurs. Je ne veux pas non plus relancer une Xeme fois cette polémique, mais moi je le trouve moins contrôlable, voilà tout.
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

  19. #19
    Membre averti

    Profil pro
    Coach Agile
    Inscrit en
    Décembre 2005
    Messages
    316
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Coach Agile

    Informations forums :
    Inscription : Décembre 2005
    Messages : 316
    Points : 371
    Points
    371
    Par défaut
    En fait, lorsque j'écris

    Ton bouton "Rechercher" fonctionne à merveille (si le résultat attendu est bien le remplissage du tableau).
    je ne me suis pas contenté de contrôler que cela remplissait le tableau. Cela ne lève aucune exception non-plus .

    Chris.

  20. #20
    Membre régulier
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    147
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Septembre 2006
    Messages : 147
    Points : 120
    Points
    120
    Par défaut
    Citation Envoyé par jproto
    En fait, lorsque j'écris


    je ne me suis pas contenté de contrôler que cela remplissait le tableau. Cela ne lève aucune exception non-plus .

    Chris.
    Au temps pour moi

    En fait ca me déprime, je ne sais plus que faire.
    Il y a 10 types de personnes, celles qui connaissent le binaire, et les autres...

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 3 123 DernièreDernière

Discussions similaires

  1. [POO] Erreur lors de l'utilisation de $this en PHP5
    Par Ekimasu dans le forum Langage
    Réponses: 4
    Dernier message: 03/11/2006, 20h21
  2. Erreur lors de l'utilisation de session_start();
    Par nane1474 dans le forum Langage
    Réponses: 8
    Dernier message: 30/06/2006, 12h06
  3. Erreur lors de l' utilisation des objets ADO
    Par aityahia dans le forum Bases de données
    Réponses: 10
    Dernier message: 24/03/2006, 13h46
  4. Eviter les erreurs lors de l'utilisation des compo Tsocket
    Par Coussati dans le forum Composants VCL
    Réponses: 5
    Dernier message: 01/02/2006, 19h14
  5. Erreur lors de l'utilisation de strlwr ?!
    Par MonsieurAk dans le forum C++
    Réponses: 4
    Dernier message: 05/12/2005, 10h22

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