Hello friends, I wrote this code for alert message shown to user when they uncheck the checkbox. It only woks when I mouse key is realized with in the checkbox. If user click the checkbox and release out of the checkbox it allow user to uncheck the checkbox and doesn't shows alert message. How can I solve this bug?
public void mouseClicked(MouseEvent e) {
Vector matNoVect = new Vector();
if (e.getClickCount() == 1) {
Utools.setMouseBusy(sstEndProductMaterials.table);
try {
Vector v = new Vector();
v = Inter.LoadContents(str);
System.out.println(v);
if (v.size() > 0) {
if (Integer.parseInt(v.get(0).toString()) > 0) {
JOptionPane.showMessageDialog(null,"Material "+matNo+" is used in some Item");
sstEndProductMaterials.table.setValueAt(new Boolean(true),index, 7);
Utools.setMouseNormal(sstEndProductMaterials.table);
return;
}
}
} catch (Exception e11) {
e11.printStackTrace();
Utools.setMouseNormal(sstEndProductMaterials.table);
}
}
}