I need help to show the data of a matrix, I use a variable a, which indicates the number of records (columns) it will have and 4 are the rows or fields it contains (identification, name, address, phone), The problem I have is that I need to enter only the identification and show the rest of the data that exists in that row.
int a;
a=Integer.parseInt(txt1.getText());
String datos[][] = new String[a][4];
for(int i=0;i<a;i++){
JOptionPane.showMessageDialog(null,"Ha ingresado "+i+" datos");
JOptionPane.showMessageDialog(null,"Ingrese los datos en el siguiente orden \nCedula\nNombre\nDireccion\nTelefono");
for(int j=0;j<4;j++){
datos[i][j]=JOptionPane.showInputDialog(null,"Ingrese los datos");
}
}
JOptionPane.showMessageDialog(null,"Busqueda de los datos ingresados");