So I'm trying to after searching a name click on the table and then edit it in other table, the problem is that I'm not getting the right ID but instead only getting the ID that is the first.
Edit Code
int linha = this.jTable1.getSelectedRow(); int idUtilizador = Integer.parseInt((String)(this.jTable1.getModel() ).getValueAt(linha, 0)); Utilizador uti = UtilizadorJpaController.read(idUtilizador); CriarCliente updateCliente = new CriarCliente(uti); updateCliente.setVisible(true); Search Code
DefaultTableModel model = (DefaultTableModel) jTable1.getModel(); TableRowSorter<DefaultTableModel> tr = new TableRowSorter<DefaultTableModel>(model); jTable1.setRowSorter(tr); tr.setRowFilter(RowFilter.regexFilter(jTextField1.getText().trim(),1))