I would like to know how to retrieve information from a line of my JTable
, follow the line of code of it.
Usuarios operacao = new Usuarios();
DefaultTableModel tabela = new DefaultTableModel();
private void adicionarLinhas(String nome, String patente, String sessao, String email) {
this.tabela.addRow(new Object[]{nome, patente, sessao, email});
}
public void Executar() throws IOException, ClassNotFoundException {
ArrayList<UsuariosBase> usuarios2 = operacao.LeituraDeRegistros();
for (UsuariosBase registros : usuarios2) {
tabela = (DefaultTableModel) jTable1.getModel();
this.adicionarLinhas(registros.nome, registros.patente, registros.sessao, registros.email);
}
}
public void Listar() throws IOException, ClassNotFoundException {
operacao.RecuperadorDeNomes();
for (int i = 1; i < operacao.totalDeArquivos; i++) {
Executar();
}
}