Hi Ananad,
Please see correct code:
////////////////
private void insertLedgerBalance(int iRow)
{
try{
if (optReceipts.isSelected())
{
String atCode = (String)tbl_PettyReceipt.getValueAt(iRow, 0);
String atAmount = (String)tbl_PettyReceipt.getValueAt(iRow, 3);
}
else if(optDeduction.isSelected())
{
for (int a = 0; a < tbl_PettyReceipt.getRowCount(); a++)
{
String atCode = (String)tbl_PettyReceipt.getValueAt(iRow, 0);
String atAmount = (String)tbl_PettyReceipt.getValueAt(iRow, 3);
}
}
}
catch(Exception e){
System.out.println(e);
}
}