Bom, to com outro probleminha agora:
Tenho um Check Box, que deve verificar se já tem “Confirmação de Envio/Recebimento”. É como se fosse um “Já Impresso”.
Na minha query, a verificação é:
if (MInOutConfirm.isSelected()) {
sql.append("AND ioc.M_InOutConfirm_ID != 0 ");
index++;
index4 = index;
}
porque se a ID for igual a Zero, é porque ainda não gerou.
Aí no actionPerformed eu adicionei o seguinte:
//Check Box Com confirmação de envio/recebimento
if (e.getSource().equals(MInOutConfirm))
{
if (MInOutConfirm.isSelected()){
executeQuery();
return;
}
}
Mas quando eu clico no check box ele da o seguinte erro:
<blockquote>Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException
at org.adempiere_fricke.apps.FormExpedicao.executeQuery(FormExpedicao.java:367)
at org.adempiere_fricke.apps.FormExpedicao.actionPerformed(FormExpedicao.java:448)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(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.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)</blockquote>
e retorna em branco.
Agradeço se alguém puder ajudar 