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

1 resposta
P

Sou novato no desenvolvimento Java e precisando de uma ajudinha suas se for possível é claro. Estou trabalhando em uma empresa que tem um sistema em Access conectado como o Sql Server, com isso comecei a desenvolver o mesmo sistema em Java.

Já criei a pagina principal e a pagina do RH, criei a conexão com o banco e funcionou belezinha. Só que na hora de criar um botão para trazer o primeiro registro do banco não estou conseguindo é apresentado varias exceptions. Segue as mesmas.

Desde de já agradeço pela atenção. Obrigado

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

at IntefaceGrafica.FormCadastroFuncionarios.jButtonPrimeiroActionPerformed(FormCadastroFuncionarios.java:1175)

at IntefaceGrafica.FormCadastroFuncionarios.access$200(FormCadastroFuncionarios.java:17)

at IntefaceGrafica.FormCadastroFuncionarios$4.actionPerformed(FormCadastroFuncionarios.java:1057)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)

at java.awt.Component.processMouseEvent(Component.java:6535)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)

at java.awt.Component.processEvent(Component.java:6300)

at java.awt.Container.processEvent(Container.java:2236)

at java.awt.Component.dispatchEventImpl(Component.java:4891)

at java.awt.Container.dispatchEventImpl(Container.java:2294)

at java.awt.Component.dispatchEvent(Component.java:4713)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)

at java.awt.Container.dispatchEventImpl(Container.java:2280)

at java.awt.Window.dispatchEventImpl(Window.java:2750)

at java.awt.Component.dispatchEvent(Component.java:4713)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)

at java.awt.EventQueue.access$500(EventQueue.java:97)

at java.awt.EventQueue$3.run(EventQueue.java:709)

at java.awt.EventQueue$3.run(EventQueue.java:703)

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

at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)

at java.awt.EventQueue$4.run(EventQueue.java:731)

at java.awt.EventQueue$4.run(EventQueue.java:729)

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

at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

1 Resposta

D

java.lang.NullPointerException significa que algum valor é null e não poderia ser null

IntefaceGrafica.FormCadastroFuncionarios.jButtonPrimeiroActionPerformed(FormCadastroFuncionarios.java:1175)

A exceção é disparada na classe FormCadastroFuncionarios na linha 1175 no método jButtonPrimeiroActionPerformed

Criado 18 de julho de 2016
Ultima resposta 18 de jul. de 2016
Respostas 1
Participantes 2