Moving an if statement result

Could someone tell me why when this code is run that the multiplied value is put into column 1? i would like it to appear in column 2. Basically the information in the if statement.

int a = Integer.parseInt(txtRangeFrom.getText());

int b = Integer.parseInt(txtRangeTo.getText());

double y = 10;

DefaultTableModel model =new DefaultTableModel(b - a + 1, 2);

for(int row = a; row <= b; ++row)

for(int col = 0; col <= 1; ++col)

model.setValueAt(String.valueOf(row), row - a, 0);

tblOut.setModel(model);

if (a > 0)

for(int row = a; row <= b; ++row)

for(int col = 1; col <= 1; ++col)

model.setValueAt(String.valueOf(row * y), row - a, 0);

Thanks

[1170 byte] By [T-mosea] at [2007-11-27 1:37:30]
# 1
In both places I seemodel.setValueAt(..., ..., 0);What column is that ? :-)
DrLaszloJamfa at 2007-7-12 0:48:12 > top of Java-index,Java Essentials,New To Java...
# 2
CROSSPOSTED: http://forum.java.sun.com/thread.jspa?threadID=5162549&messageID=9620148
DrLaszloJamfa at 2007-7-12 0:48:12 > top of Java-index,Java Essentials,New To Java...
# 3
Thanks got it working now
T-mosea at 2007-7-12 0:48:12 > top of Java-index,Java Essentials,New To Java...