Javafree
Página Inicial do Fórum > Java Básico

JAVA e BD



Criar novo tópico   Responder tópico
  1. Comment Arrow

    Publicado em: 12/05/2016 14:14:43

    OLÁ ESTOU PRECISANDO DE AJUDA EM JAVA JUNTO AO BANCO DE DADOS, POIS ESTOU CRIANDO UMA TELA DE VENDAS PARA ESCOLA, MAS ESTOU COM PROBLEMA NA HORA DE USAR O COMBOBOX, POIS QUERO PEGAR INFORMAÇÕES DA JTABLE, MAS EU UTILIZO ESSE COMANDO "cbxPostal.setSelectedItem(pessoaSelecionada.getCod_postal().getCodigo());"
    SÓ QUE ELE VOLTA ESSE ERRO


    ""!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at br.senai.sp.view.PainelPessoa$1.mouseClicked(PainelPessoa.java:326)
    at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    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)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at br.senai.sp.view.PainelPessoa$1.mouseClicked(PainelPessoa.java:326)
    at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    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)



  1. staroski
    Posts:4599


    Comment Arrow

    Publicado em: 13/05/2016 08:58:05

    NullPointerException significa que você está tentando acessar um membro de um objeto que não foi inicializado.

    Seu erro está acontecendo na linha 326 do arquivo PainelPessoa.java

    Dica: Não há necessidade de postar 4 vezes o mesmo problema, apaguei os seus outros 3 posts iguais à este.

    _________________

    Ricardo Artur Staroski, OCP-JP
    Blumenau - SC
    Faço seu trabalho Java,
    clique aqui

    Acesse http://www.guj.com.br/

  1. Comment Arrow

    Publicado em: 13/05/2016 15:06:01

    [quote="staroski"]NullPointerException significa que você está tentando acessar um membro de um objeto que não foi inicializado.

    Seu erro está acontecendo na linha 326 do arquivo PainelPessoa.java

    Dica: Não há necessidade de postar 4 vezes o mesmo problema, apaguei os seus outros 3 posts iguais à este.



    obrigado, consegui arrumar o erro, mas os outros 3 posts é porque meu pc esta lento e clickei 4 vezes, desculpa qualquer coisa



  1. Relacionados