Storing content of jTable in jTextField
hi I am trying to store the content of a cell of Jtable in jTextField....but its giving me errors...
public class MyTable extends Applet
{
int rowIndex = 1;
int vColIndex = 1;
Object o = jTable1.getValueAt(rowIndex, vColIndex);
String value = "";
if (o != null)
{
value = o.toString();// Illegal start of type
}
jTextField1.setText(value);//<identifier> expected
}
I would appreciate if any one could help me
[502 byte] By [
ElishaWa] at [2007-11-27 8:27:21]

What is the error?If o comes back as null, you have a check to for that before you call the toString() method, but you then set the text field text regardless of whether the object came back as null.
Bryano, I have tried setting the textField in the for loop as well....but it still gives me the illegal start of type error.....what i am trying to do is that the content should be displyed in the textField.Thanks a ton for your help