private void compute_charges() { // double total = 0; if (tbl_charges_ALM.isEmpty()) { total = 0; } else { List<S2_customers.to_cust_charges> datas = tbl_charges_ALM; for (S2_customers.to_cust_charges to : datas) { total += to.amount; } } tf_total.setText("" + NumType.with_comma(Double.parseDouble("" + total))); }
@Override public Object getValueAt(int row, int col) { S2_customers.to_cust_charges tt = (S2_customers.to_cust_charges) getRow(row); switch (col) { case 0: return tt.or; case 1: return tt.ci_number; case 2: return NumType.with_comma(tt.amount); default: return (tt.date_added); } }