Bonjour,
A chaque lancement de mon appli, une JList se remplit (à partir d'une base de données) et s'affiche.
Mais j'obtiens aléatoirement ce bug :
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 Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source) at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source) at javax.swing.plaf.basic.BasicListUI.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.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) at java.awt.EventDispatchThread.run(Unknown Source)
Je dis bien "aléatoirement" ! des fois oui, des fois non ! Dans tous les cas je peux continuer à utiliser mon application. Par contre j'obtiens parfois un autre bug : ma liste reste blanche au démarrage. Je peux quand-même cliquer sur les éléments invisibles ! Si je clique sur mon bouton de tri, alors la liste est rechargée, et elle s'affiche correctement.
J'ai donc ces deux problèmes à résoudre, mais je bloque car la trace ne m'indique même pas quel composant est concerné....
Pourriez-vous me mettre sur la voie svp ? Je peux vous fournir des bouts de mon code si nécessaire.
Partager