Netbeans swing Master detail sample form delete not working <p>I'm using NB 7.4, JavaDb , jdk 7.</p> <p>I tried to work on this example : <a href="http://simsam7.blogspot.in/2013/06/quick-crud-application-on-netbeans-73.html" rel="nofollow">http://simsam7.blogspot.in/2013/06/quick-crud-application-on-netbeans-73.html</a></p> <p>In CRUD, CRU works good, but delete not working,and its not throwing any error also.</p> <p>My Code for delete button.</p> <pre><code> int[] selected = masterTable.getSelectedRows(); List&lt;com.fz.PurchaseOrder&gt; toRemove = new ArrayList&lt;com.fz.PurchaseOrder&gt;(selected.length); for (int idx = 0; idx &lt; selected.length; idx++) { com.fz.PurchaseOrder p = list.get(masterTable.convertRowIndexToModel(selected[idx])); toRemove.add(p); entityManager.remove(p); } list.removeAll(toRemove); </code></pre> <p>I done debug, and i think error at entityManager.remove(p).</p> <p><strong>INFO :</strong> Output GUI - The row in table removes/delete good, but when i refresh it shows again.</p>