Pegar o valor da tabela

3 respostas
M

Consegui pegar o valor da linha e da coluna usando e agora preciso jogar
esse obj numa string, como faco isso ???

Object obj = 
tabela1.getValueAt(tabela1.getSelectedRow(),tabela1.getSelectedColumn());

3 Respostas

Ratao

Tente assim:

String str;
str = String.valueOf(tabela1.getValueAt(tabela1.getSelectedRow(),tabela1.getSelectedColumn()));

abraço! :wink:

Bravox

dar para vc usar cast

String s =  (String )tabela1.getValueAt(tabela1.getSelectedRow(),tabela1.getSelectedColumn());
M

ok

obrigado

Criado 8 de fevereiro de 2007
Ultima resposta 8 de fev. de 2007
Respostas 3
Participantes 3