Note that there are some explanatory texts on larger screens.

plurals
  1. PONull Pointer Exception from JCalander Combobox
    primarykey
    data
    text
    <p>My Java Application produces Null Pointer Exception from JCalander Combobox. I tried to catch the error. But that didnt work. Can someone assist me to fix this. Please.</p> <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.util.Calendar.setTime(Calendar.java:1106) at java.text.SimpleDateFormat.format(SimpleDateFormat.java:955) at java.text.SimpleDateFormat.format(SimpleDateFormat.java:948) at java.text.DateFormat.format(DateFormat.java:336) at org.freixas.jcalendar.JCalendarCombo.paramString(JCalendarCombo.java:780) at java.awt.Component.toString(Component.java:8095) tbmodel = (DefaultTableModel)tblItmQty.getModel(); System.out.println(calRecvDate.getDate()); try{ if(calRecvDate.getDate()==null){ // Error JOptionPane.showMessageDialog(null, "Please Select Shippment Received Date"); calRecvDate.requestFocus(); }else if(txtShipSs.getText().isEmpty()){ </code></pre> <p>////////////////////////////////////////////////////////////////</p> <pre><code> if (inputValidate() == true) { try { String shipId = txtShipId.getText(); String invID = txtInvoice.getText(); String shipSs = txtShipSs.getText(); String address = txtNtfAddress.getText(); String sipper = txtAShipper.getText(); String vessal = txtVessal.getText(); Date rcvDate = calRecvDate.getDate(); // Jcalander String consignee = txtConsigne.getText(); ArrayList&lt;ShippmentItems&gt; shipItems = new ArrayList&lt;ShippmentItems&gt;(); tbmodel = (DefaultTableModel) tblItmQty.getModel(); for (int i = 0; i &lt; tbmodel.getRowCount(); i++) { String itmcode = (String) tbmodel.getValueAt(i, 0); String itmName = (String) tbmodel.getValueAt(i, 1); int qty = (int) tbmodel.getValueAt(i, 2); ShippmentItems shpItems = new ShippmentItems(shipId, itmcode, itmName, qty); shipItems.add(shpItems); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload