Como Tratar Este Erro

2 respostas
jonasjgs2

Tenho uma aplicação que esta me dando este erro.
a aplicação tem um jlist na tela e alguns jlabel
e a cada registro eu atualizo estes objetos
de uma hora pra outra me da este erro
como faco para tratar

Exception in thread AWT-EventQueue-0 java.lang.NullPointerException

at javax.swing.BufferStrategyPaintManager.flushAccumulatedRegion(Unknown

Source)

at javax.swing.BufferStrategyPaintManager.endPaint(Unknown Source)

at javax.swing.RepaintManager.endPaint(Unknown Source)

at javax.swing.JComponent._paintImmediately(Unknown Source)

at javax.swing.JComponent.paintImmediately(Unknown Source)

at javax.swing.RepaintManager$3.run(Unknown Source)

at javax.swing.RepaintManager$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour

ce)

at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)

at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)

at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)

at javax.swing.RepaintManager.access$1100(Unknown Source)

at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$200(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour

ce)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(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)

2 Respostas

E

NullPointerException

Tem algo vindo nulo no seu fluxo, refaça seu fluxo debugando.

jonasjgs2

Eiro, obrigado pela ajuda mas não e isso…
este erro esta sendo causado por atualização de campos swing na tela…
porem observe que não mostra numero de linha com erro…
se fosse um nullpointerexception causado por minha aplicação ele mostraria o numero da linha que tem o null…
este erro esta sendo causado devido ao swing em alguns objetos não ser thread safe… por isso que eu estou com problema… e preciso saber como tratar…

Criado 13 de outubro de 2014
Ultima resposta 13 de out. de 2014
Respostas 2
Participantes 2