Using default table models help!
I have a small program that allows the user to enter two values (a and b) and then the range between these numbers is output in a table. e.g. a=1 and b=5 result would be 1,2,3,4,5. This works fine but when the result is printed the column titles change to A and B is there a way of changing these values. Is there a way of getting the same result without having to use the import? Also can someone explain to me what "import javax.swing.table.DefaultTableModel;" means and what it does.
Thanks
int a = Integer.parseInt(txtRangeFrom.getText());
int b = Integer.parseInt(txtRangeTo.getText());
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);

