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 1 semana 3 días
hace 1 semana 3 días
hace 1 semana 3 días
hace 25 semanas 6 días
hace 27 semanas 1 día
hace 33 semanas 5 días
hace 1 año 26 semanas
hace 2 años 38 semanas
hace 2 años 42 semanas
hace 2 años 49 semanas