hola nuevamente, sigo con el tema de JTable, pero mi dudas es otra.
tengo un Jtable y unos txbox
el problemas es el siguientes.cuando le doy click a un registro. por ejemplo al 1 y luego paso al tercero.
No me carga los datos del campo observacion, ademas arrastra el cod de auxiliar1 al regitro 3 que no tuvo auxiliar, algo asi
les dejo el codigo del metodo que estoy implementando para el evento Mouseclicked
muchas gracias por el apoyo
Código:
private void tablaflotamouseClicked(MouseEvent evt) {
// TODO Auto-generated method stub
int fila = tablaflota.rowAtPoint(evt.getPoint());
//se muestra la informacion en los txt
txtId.setText(tablaflota.getValueAt(fila, 0).toString());
fecha.setDate(Date.valueOf(tablaflota.getValueAt(fila, 1).toString()));
txtCodunidad.setText(tablaflota.getValueAt(fila, 2).toString());
txtCodchofer.setText(tablaflota.getValueAt(fila, 3).toString());
txtCodlider.setText(tablaflota.getValueAt(fila, 4).toString());
txtCodaux1.setText(tablaflota.getValueAt(fila, 5).toString());
txtCodaux2.setText(tablaflota.getValueAt(fila, 6).toString());
txtObserv.setText(tablaflota.getValueAt(fila, 7).toString());
}