Sumatoria a ultimo digito
Buenas estoy sumando concatenando dos tablas (String) que son el codigo y el nroCorrelativo: https://www.dropbox.com/s/rijm34edyo7hbxn/1.PNG como se aprecia en la imagen. https://www.dropbox.com/s/qg3pv3wmjxwmmbz/2.PNG
Como podría sumarle un digito al ultimo caracter del Correlativo(---------->0005)
void setCodClsf(){
int fila = tblClsf.getSelectedRow();
JTable jt = tblClsf;
// String cod = (String)jt.getValueAt(tblClsf.getSelectedRow(), 0);
// String descri = (String)jt.getValueAt(tblClsf.getSelectedRow(), 1);
// String nro = (String)jt.getValueAt(tblClsf.getSelectedRow(), 2);
int a1 = Integer.parseInt((String)jt.getValueAt(fila, 2));
txtCodigoMalm.setText((jt.getValueAt(fila, 0).toString())+""+ (jt.getValueAt(fila, 2)));
txtDescriMalm.setText(jt.getValueAt(fila, 1).toString());
al00ClsfJDAyuda.setVisible(false);
}
int fila = tblClsf.getSelectedRow();
JTable jt = tblClsf;
// String cod = (String)jt.getValueAt(tblClsf.getSelectedRow(), 0);
// String descri = (String)jt.getValueAt(tblClsf.getSelectedRow(), 1);
// String nro = (String)jt.getValueAt(tblClsf.getSelectedRow(), 2);
int a1 = Integer.parseInt((String)jt.getValueAt(fila, 2));
txtCodigoMalm.setText((jt.getValueAt(fila, 0).toString())+""+ (jt.getValueAt(fila, 2)));
txtDescriMalm.setText(jt.getValueAt(fila, 1).toString());
al00ClsfJDAyuda.setVisible(false);
}
- Inicie sesión o regístrese para enviar comentarios
Comentarios recientes
hace 5 días 12 horas
hace 5 días 12 horas
hace 5 días 13 horas
hace 25 semanas 1 día
hace 26 semanas 3 días
hace 33 semanas 1 día
hace 1 año 25 semanas
hace 2 años 37 semanas
hace 2 años 41 semanas
hace 2 años 49 semanas