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

