Olá
Eu estou com esse array ai que carrega um jtable com AbstractTableModel indicado pelo ViniGodoy
final Object[][] data = {
{"1", "21/06/2011", "Teste 1", new ImageIcon(situacao), new ImageIcon(editar), new ImageIcon(excluir)},
{"1", "21/06/2011", "Teste 1", new ImageIcon(situacao), new ImageIcon(editar), new ImageIcon(excluir)}
};
Ele esta funcionando só que eu tenho que colocar as linhas na mão… eu quero carregar ele como o resultado de uma consulta e assim preencher o jTable.
Tentei colocar ele dentro de um while mais não funcionou, depois tentei colocar o while dentro dele e também não funcionou.
Como tenho que fazer para carregar ele +ou- assim:
while () {conexao.rs.next()
final Object[][] data = {
{"1", "21/06/2011", "Teste 1", new ImageIcon(situacao), new ImageIcon(editar), new ImageIcon(excluir)},
{"1", "21/06/2011", "Teste 1", new ImageIcon(situacao), new ImageIcon(editar), new ImageIcon(excluir)}
};
}//Final do loop
Ou como seria o correto?
